File: rcfile

package info (click to toggle)
roxen 1.2beta2-2
  • links: PTS
  • area: contrib
  • in suites: hamm
  • size: 16,948 kB
  • ctags: 8,589
  • sloc: ansic: 89,632; asm: 8,431; sh: 2,915; makefile: 1,787; cpp: 377
file content (43 lines) | stat: -rw-r--r-- 937 bytes parent folder | download | duplicates (2)
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
39
40
41
42
43
#!/bin/sh
#
# Start the Roxen webserver

test -x /usr/bin/pike -a -x /usr/lib/roxen/start || exit 0

case "$1" in
  start)
    echo -n "Starting Roxen http server: roxen"
    cd /usr/lib/roxen
    ./start > /dev/null
    echo "."
    ;;
  stop)
    if [ -f /var/run/roxen.pid:0 ]; then
	echo -n "Stopping Roxen http server: roxen"
	touch /var/run/Roxen_Shutdown_`tail -1 /var/run/roxen.pid:0`
	kill -TERM `head -1 /var/run/roxen.pid:0`
	echo "."
    else
	echo "No pidfile found, sorry."
    fi
    ;;
  reload|force-reload)
    if [ -f /var/run/roxen.pid:0 ]; then
	echo -n "Reloading configuration for Roxen http server: roxen"
	kill -TERM `head -1 /var/run/roxen.pid:0`
	echo "."
    else
	echo "No pidfile found, sorry."
    fi
    ;;
  restart)
    sh /etc/init.d/roxen stop
    sleep 2
    sh /etc/init.d/roxen start
     ;;
  *)
    echo "Usage: /etc/init.d/roxen {start|stop|reload|restart|force-reload}"
    exit 1
esac

exit 0