PREIN
/bin/sh
getent group condor >/dev/null || groupadd -r condor
getent passwd condor >/dev/null || \
useradd -r -g condor -d /var/lib/condor -s /sbin/nologin \
-c "Owner of Condor Daemons" condor
exit 0
PREUN
/bin/sh
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable condor.service > /dev/null 2>&1 || :
/bin/systemctl stop condor.service > /dev/null 2>&1 || :
fi
POSTIN
/bin/sh
test -x /usr/sbin/selinuxenabled && /usr/sbin/selinuxenabled
if [ $? = 0 ]; then
restorecon -R -v /var/lock/condor
setsebool -P condor_domain_can_network_connect 1
semanage port -a -t condor_port_t -p tcp 12345
# the number of extraneous SELinux warnings on f17 is very high
fi
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
/bin/systemd-tmpfiles --create /etc/tmpfiles.d/condor.conf 2>&1 || :
fi
POSTUN
/bin/sh
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart condor.service >/dev/null 2>&1 || :
fi
Triggers
condor <
7.7.0-0.5
/bin/sh
/usr/bin/systemd-sysv-convert --save condor >/dev/null 2>&1 ||:
/sbin/chkconfig --del condor >/dev/null 2>&1 || :
/bin/systemctl try-restart condor.service >/dev/null 2>&1 || :