Sophie

Sophie

distrib > Fedora > 20 > x86_64 > by-pkgid > df49d1bfd185e29b9245dee7b4287e49 > scriptlet

dl-0.13-3.fc20.noarch.rpm

POSTIN

/bin/sh
# selinux: allow PHP to read/write data directory
semanage fcontext -a -t httpd_sys_rw_content_t "/var/spool/dl(/.*)?"
restorecon -R -v /var/spool/dl > /dev/null

# create sqlite db if it doesn't already exist
if [ ! -f /var/spool/dl/data.sdb ]; then
    su -c 'sqlite3 /var/spool/dl/data.sdb' -s /bin/sh apache < /usr/share/dl/include/scripts/db/sqlite.sql 
fi
:

POSTUN

/bin/sh
# selinux: cleanup after uninstall
if [ $1 -eq 0 ]; then
    semanage fcontext -d -t httpd_sys_rw_content_t "/var/spool/dl(/.*)?"
    restorecon -R -v /var/spool/dl > /dev/null
fi
: