1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#! /bin/sh
### BEGIN INIT INFO
# Provides: otrs2
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: switches otrs2 from maintainance into active mode and back
### END INIT INFO
case "$1" in
start)
if [ -L /var/lib/otrs/httpd/htdocs/maintainance.html ]; then
rm /var/lib/otrs/httpd/htdocs/maintainance.html
fi
ln -s /etc/otrs/cron /etc/cron.d/otrs
;;
stop)
ln -s /etc/otrs/maintainance.html /var/lib/otrs/httpd/htdocs/
if [ -L /etc/cron.d/otrs ]; then
rm /etc/cron.d/otrs
fi
;;
restart|force-reload|reload)
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|reload}" >&2
exit 1
;;
esac
exit 0
|