Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > a5609c4f97a9fac21ea413cc232fa261 > scriptlet

glpi-0.83.9.1-4.fc18.noarch.rpm

POSTIN

/bin/sh
(
# New File context
semanage fcontext -a -s system_u -t httpd_sys_script_rw_t -r s0 "/etc/glpi(/.*)?" 
semanage fcontext -a -s system_u -t httpd_log_t           -r s0 "/var/log/glpi(/.*)?"
# keep httpd_sys_script_rw_t (httpd_var_lib_t prevent dir creation)
semanage fcontext -a -s system_u -t httpd_sys_script_rw_t -r s0 "/var/lib/glpi(/.*)?"
# files created by app
restorecon -R /etc/glpi
restorecon -R /var/lib/glpi
restorecon -R /var/log/glpi
) &>/dev/null
/sbin/service httpd condrestart > /dev/null 2>&1 || :

POSTUN

/bin/sh
if [ "$1" -eq "0" ]; then
    # Remove the File Context
    (
    semanage fcontext -d "/etc/glpi(/.*)?"
    semanage fcontext -d "/var/log/glpi(/.*)?"
    semanage fcontext -d "/var/lib/glpi(/.*)?"
    ) &>/dev/null
fi
/sbin/service httpd condrestart > /dev/null 2>&1 || :