Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/hgweb/files/hgweb.sh

Issue 29323409: Issue 2867 - Introduce module hgweb and corresponding server role (Closed)
Patch Set: Created Aug. 10, 2015, 8:15 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/hgweb/files/hgweb.ini ('k') | modules/hgweb/files/nginx.conf » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash
2 ### BEGIN INIT INFO
3 # Provides: hgwebdir
4 # Required-Start: $local_fs $remote_fs $network
5 # Required-Stop: $local_fs $remote_fs $network
6 # Default-Start: 3 5
7 # Default-Stop: 0 1 2 6
8 # Description: HG FastCGI server
9 ### END INIT INFO
10
11 SCRIPT=/opt/hgweb.fcgi
12 FCGI_SOCKET=/var/run/hgweb.sock
13 PID_FILE=/var/run/hgweb.pid
14 USER=www-data
15
16 start() {
17 spawn-fcgi -f $SCRIPT -s $FCGI_SOCKET -P $PID_FILE -u $USER
18 }
19
20 stop() {
21 if [ -e "$PID_FILE" ]; then
22 kill -9 `cat $PID_FILE` && rm $PID_FILE && rm $FCGI_SOCKET
23 else
24 echo "daemon not running" >&2
25 fi
26 }
27
28 help() {
29 echo "Usage: $0 {start|stop|restart}"
30 test 'help' = "$1"
31 }
32
33 case "$1" in
34 start|stop) $1;;
35 restart) stop; start;;
36 *) help "$@";;
37 esac
OLDNEW
« no previous file with comments | « modules/hgweb/files/hgweb.ini ('k') | modules/hgweb/files/nginx.conf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld