OLD | NEW |
1 #! /bin/sh | 1 #! /bin/sh |
2 ### BEGIN INIT INFO | 2 ### BEGIN INIT INFO |
3 # Provides: webtry | 3 # Provides: webtry |
4 # Required-Start: $remote_fs $syslog | 4 # Required-Start: $remote_fs $syslog |
5 # Required-Stop: $remote_fs $syslog | 5 # Required-Stop: $remote_fs $syslog |
6 # Default-Start: 2 3 4 5 | 6 # Default-Start: 2 3 4 5 |
7 # Default-Stop: 0 1 6 | 7 # Default-Stop: 0 1 6 |
8 # Short-Description: Start webtry. | 8 # Short-Description: Start webtry. |
9 # Description: Web server for trying Skia C++ code. | 9 # Description: Web server for trying Skia C++ code. |
10 ### END INIT INFO | 10 ### END INIT INFO |
11 | 11 |
12 # Author: Joe Gregorio <jcgregorio@google.com> | 12 # Author: Joe Gregorio <jcgregorio@google.com> |
13 # | 13 # |
14 # Copied from /etc/init.d/skeleton and modified only the following | 14 # Copied from /etc/init.d/skeleton and modified only the following |
15 # environment variables and updated the start-stop-daemon calls | 15 # environment variables and updated the start-stop-daemon calls |
16 # in do_start() to add --make-pidfile, --background, and --chuid. | 16 # in do_start() to add --make-pidfile, --background, and --chuid. |
17 | 17 |
18 # Do NOT "set -e" | 18 # Do NOT "set -e" |
19 | 19 |
20 # PATH should only include /usr/* if it runs after the mountnfs.sh script | 20 # PATH should only include /usr/* if it runs after the mountnfs.sh script |
21 PATH=/sbin:/usr/sbin:/bin:/usr/bin | 21 PATH=/sbin:/usr/sbin:/bin:/usr/bin |
22 DESC="The Skia webtry application." | 22 DESC="The Skia webtry application." |
23 NAME=webtry | 23 NAME=webtry |
24 DAEMON=/home/webtry/skia/experimental/webtry/$NAME | 24 DAEMON=/home/webtry/skia/experimental/webtry/$NAME |
25 DAEMON_ARGS="--use_chroot" | 25 DAEMON_ARGS="--use_chroot --log_dir=/tmp/glog" |
26 PIDFILE=/var/run/$NAME.pid | 26 PIDFILE=/var/run/$NAME.pid |
27 SCRIPTNAME=/etc/init.d/$NAME | 27 SCRIPTNAME=/etc/init.d/$NAME |
28 | 28 |
29 # Exit if the package is not installed | 29 # Exit if the package is not installed |
30 [ -x "$DAEMON" ] || exit 0 | 30 [ -x "$DAEMON" ] || exit 0 |
31 | 31 |
32 # Read configuration variable file if it is present | 32 # Read configuration variable file if it is present |
33 [ -r /etc/default/$NAME ] && . /etc/default/$NAME | 33 [ -r /etc/default/$NAME ] && . /etc/default/$NAME |
34 | 34 |
35 # Load the VERBOSE setting and other rcS variables | 35 # Load the VERBOSE setting and other rcS variables |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 esac | 150 esac |
151 ;; | 151 ;; |
152 *) | 152 *) |
153 #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 | 153 #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 |
154 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 | 154 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 |
155 exit 3 | 155 exit 3 |
156 ;; | 156 ;; |
157 esac | 157 esac |
158 | 158 |
159 : | 159 : |
OLD | NEW |