Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 28aa94e09601ae24189d217417cfdb99 > scriptlet

askbot-0.7.48-8.fc18.noarch.rpm

POSTIN

/bin/sh
# Question -> Can selinux be managed in attr(...)?
chcon -R -t httpd_log_t /var/log/askbot/
chcon -R -t httpd_sys_rw_content_t /var/cache/askbot/

## We may or may not want to run the %post steps below for other users.
#
## First, jump into the config dir.  manage.py expects settings.py to be in cwd
#pushd /etc/askbot/sites/ask/config/
#
## Gather up dynamic resources and put them in a static/ dir
#mkdir -p /usr/lib/python2.7/site-packages/askbot/static/
#echo "yes" | python manage.py collectstatic
#
## Make db schema updates
#echo "no" | python manage.py syncdb
#python manage.py migrate askbot
#python manage.py migrate django_authopenid
#
#popd
#
## Symlink the default skin into the skins directory
#ln -s /usr/lib/python2.7/site-packages/askbot/static/default \
#    /usr/lib/python2.7/site-packages/askbot/skins/default

# Set perm mask for httpd
chown -R apache:apache /var/log/askbot/
chown -R apache:apache /var/cache/askbot/

#%preun
## These get dynamically generated in the %post section and so don't
## get taken care of by the %files cleanup
#rm -rf /usr/lib/python2.7/site-packages/askbot/static
#rm -rf /usr/lib/python2.7/site-packages/askbot/skins
#rm -rf /usr/lib/python2.7/site-packages/askbot/locale