File: init

package info (click to toggle)
otrs2 2.2.7-2lenny3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 13,444 kB
  • ctags: 5,808
  • sloc: perl: 129,825; xml: 16,139; sql: 11,400; sh: 1,198; makefile: 31; 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