File: init

package info (click to toggle)
otrs2 2.0.4p01-18
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,900 kB
  • ctags: 4,437
  • sloc: perl: 81,607; xml: 8,135; sql: 8,013; sh: 1,113; makefile: 22; php: 16
file content (38 lines) | stat: -rw-r--r-- 782 bytes parent folder | download | duplicates (3)
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