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
: