File: yaws.init.d

package info (click to toggle)
yaws 1.88-2%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 5,544 kB
  • ctags: 5,440
  • sloc: erlang: 27,321; sh: 3,823; ansic: 1,264; makefile: 874; lisp: 79; xml: 12; python: 3
file content (56 lines) | stat: -rwxr-xr-x 825 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
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
#
# Startup script for the Yaws Web Server
#
# config: /etc/yaws.conf
#




yaws=%prefix%/bin/yaws
prog=yaws

# By default we run with the default id
# idopts=--id myserverid

conf="--conf %etcdir%/yaws/yaws.conf"

test -x $yaws || exit 1


case "$1" in
    start)
	echo -n "Starting $prog: "
	$yaws  ${idopts} --daemon --heart ${conf}
	echo "."
    ;;
    stop)
	echo -n "Stopping $prog: "
	$yaws  ${idopts} --stop
	echo "."
	;;
    reload)
	echo -n "Reloading $prog: "
	$yaws  ${idopts} --hup
	echo "."
	;;
    status)
	$yaws  ${idopts} --status
	echo "."
	;;
    restart)
	echo -n "Stopping $prog: "
        $yaws  ${idopts} --stop
	echo -n "Starting $prog: "
        $yaws  ${idopts} --daemon --heart
	echo "."
        ;;

    *)
	echo $"Usage: $prog {start|stop|restart|reload|status}"
	exit 1
esac

exit 0