wok view git/stuff/git-daemon @ rev 24823
updated libsdl2 and libsdl2-dev (2.0.12 -> 2.0.20)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Mar 23 16:41:04 2022 +0100 (2022-03-23) |
parents | 7f188676b59c |
children |
line source
1 #!/bin/sh
2 # /etc/init.d/git-daemon: Start, stop and restart git daemon on SliTaz,
3 # at boot time or with the command line.
4 #
5 # To start git daemon at boot time, just put git-daemon in the $RUN_DAEMONS
6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf.
7 #
8 . /etc/init.d/rc.functions
9 . /etc/daemons.conf
11 NAME=git-daemon
12 DESC="$(_ '%s daemon' Git)"
13 DAEMON=/usr/lib/git-core/git-daemon
14 OPTIONS=$GIT_OPTIONS
15 PIDFILE=/var/run/git-daemon.pid
17 case "$1" in
18 (start)
19 if active_pidfile $PIDFILE $NAME
20 then
21 _ '%s is already running.' $NAME
22 exit 1
23 fi
24 action 'Starting %s: %s...' "$DESC" $NAME
25 $DAEMON --pid-file=$PIDFILE $OPTIONS
26 status
27 ;;
28 (stop)
29 if ! active_pidfile $PIDFILE $NAME
30 then
31 _ '%s is not running.' $NAME
32 exit 1
33 fi
34 action 'Stopping %s: %s...' "$DESC" $NAME
35 kill $(cat $PIDFILE)
36 status
37 ;;
38 (restart)
39 if ! active_pidfile $PIDFILE $NAME
40 then
41 _ '%s is not running.' $NAME
42 exit 1
43 fi
44 action 'Restarting %s: %s...' "$DESC" $NAME
45 kill $(cat $PIDFILE)
46 sleep 2
47 $DAEMON --pid-file=$PIDFILE $OPTIONS
48 status
49 ;;
50 (*)
51 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
52 newline
53 exit 1
54 ;;
55 esac
57 exit 0