wok-next diff git/stuff/git-daemon @ rev 21099
Update doxygen (1.8.15), git (2.20.1); add db5 (5.3.28)
TODO: switch to using /etc/daemons.conf.d/ in other packages too.
TODO: switch to using /etc/daemons.conf.d/ in other packages too.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Jan 01 22:49:19 2019 +0200 (2019-01-01) |
parents | 7f188676b59c |
children |
line diff
1.1 --- a/git/stuff/git-daemon Thu May 26 20:16:45 2016 +0300 1.2 +++ b/git/stuff/git-daemon Tue Jan 01 22:49:19 2019 +0200 1.3 @@ -1,54 +1,54 @@ 1.4 #!/bin/sh 1.5 -# /etc/init.d/git-daemon: Start, stop and restart git-daemon daemon on SliTaz, at boot 1.6 -# time or with the command line. 1.7 +# /etc/init.d/git-daemon: Start, stop and restart git-daemon daemon on SliTaz, 1.8 +# at boot time or with the command line. 1.9 # 1.10 -# To start daemon at boot time, just put the right name in the $RUN_DAEMONS 1.11 -# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. 1.12 +# To start daemon at boot time, just put the 'git-daemon' in the $RUN_DAEMONS 1.13 +# variable of /etc/rcS.conf and configure options with 1.14 +# /etc/daemons.conf.d/git-daemon.conf 1.15 # 1.16 . /etc/init.d/rc.functions 1.17 -. /etc/daemons.conf 1.18 +. /etc/daemons.conf.d/git-daemon.conf 1.19 1.20 NAME=git-daemon 1.21 DESC="$(_ '%s daemon' Git)" 1.22 DAEMON=/usr/lib/git-core/git-daemon 1.23 -OPTIONS=$GIT_OPTIONS 1.24 PIDFILE=/var/run/git-daemon.pid 1.25 1.26 case "$1" in 1.27 - start) 1.28 - if active_pidfile $PIDFILE git-daemon ; then 1.29 - _ '%s is already running.' $NAME 1.30 - exit 1 1.31 - fi 1.32 - action 'Starting %s: %s...' "$DESC" $NAME 1.33 - $DAEMON --pid-file=$PIDFILE $OPTIONS 1.34 - status 1.35 - ;; 1.36 - stop) 1.37 - if ! active_pidfile $PIDFILE git-daemon ; then 1.38 - _ '%s is not running.' $NAME 1.39 - exit 1 1.40 - fi 1.41 - action 'Stopping %s: %s...' "$DESC" $NAME 1.42 - kill $(cat $PIDFILE) 1.43 - status 1.44 - ;; 1.45 - restart) 1.46 - if ! active_pidfile $PIDFILE git-daemon ; then 1.47 - _ '%s is not running.' $NAME 1.48 - exit 1 1.49 - fi 1.50 - action 'Restarting %s: %s...' "$DESC" $NAME 1.51 - kill $(cat $PIDFILE) 1.52 - sleep 2 1.53 - $DAEMON $OPTIONS 1.54 - status 1.55 - ;; 1.56 - *) 1.57 - emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" 1.58 - newline 1.59 - exit 1 1.60 - ;; 1.61 + start) 1.62 + if active_pidfile $PIDFILE $NAME; then 1.63 + _ '%s is already running.' $NAME 1.64 + exit 1 1.65 + fi 1.66 + action 'Starting %s: %s...' "$DESC" $NAME 1.67 + $DAEMON --pid-file=$PIDFILE $OPTIONS 1.68 + status 1.69 + ;; 1.70 + stop) 1.71 + if ! active_pidfile $PIDFILE $NAME; then 1.72 + _ '%s is not running.' $NAME 1.73 + exit 1 1.74 + fi 1.75 + action 'Stopping %s: %s...' "$DESC" $NAME 1.76 + kill $(cat $PIDFILE) 1.77 + status 1.78 + ;; 1.79 + restart) 1.80 + if ! active_pidfile $PIDFILE $NAME; then 1.81 + _ '%s is not running.' $NAME 1.82 + exit 1 1.83 + fi 1.84 + action 'Restarting %s: %s...' "$DESC" $NAME 1.85 + kill $(cat $PIDFILE) 1.86 + sleep 2 1.87 + $DAEMON $OPTIONS 1.88 + status 1.89 + ;; 1.90 + *) 1.91 + emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" 1.92 + newline 1.93 + exit 1 1.94 + ;; 1.95 esac 1.96 1.97 exit 0