wok-next annotate 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.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Jan 01 22:49:19 2019 +0200 (2019-01-01)
parents 7f188676b59c
children
rev   line source
slaxemulator@11682 1 #!/bin/sh
al@21099 2 # /etc/init.d/git-daemon: Start, stop and restart git-daemon daemon on SliTaz,
al@21099 3 # at boot time or with the command line.
slaxemulator@11682 4 #
al@21099 5 # To start daemon at boot time, just put the 'git-daemon' in the $RUN_DAEMONS
al@21099 6 # variable of /etc/rcS.conf and configure options with
al@21099 7 # /etc/daemons.conf.d/git-daemon.conf
slaxemulator@11682 8 #
slaxemulator@11682 9 . /etc/init.d/rc.functions
al@21099 10 . /etc/daemons.conf.d/git-daemon.conf
slaxemulator@11682 11
slaxemulator@11682 12 NAME=git-daemon
al@19159 13 DESC="$(_ '%s daemon' Git)"
slaxemulator@11682 14 DAEMON=/usr/lib/git-core/git-daemon
slaxemulator@11682 15 PIDFILE=/var/run/git-daemon.pid
slaxemulator@11682 16
slaxemulator@11682 17 case "$1" in
al@21099 18 start)
al@21099 19 if active_pidfile $PIDFILE $NAME; then
al@21099 20 _ '%s is already running.' $NAME
al@21099 21 exit 1
al@21099 22 fi
al@21099 23 action 'Starting %s: %s...' "$DESC" $NAME
al@21099 24 $DAEMON --pid-file=$PIDFILE $OPTIONS
al@21099 25 status
al@21099 26 ;;
al@21099 27 stop)
al@21099 28 if ! active_pidfile $PIDFILE $NAME; then
al@21099 29 _ '%s is not running.' $NAME
al@21099 30 exit 1
al@21099 31 fi
al@21099 32 action 'Stopping %s: %s...' "$DESC" $NAME
al@21099 33 kill $(cat $PIDFILE)
al@21099 34 status
al@21099 35 ;;
al@21099 36 restart)
al@21099 37 if ! active_pidfile $PIDFILE $NAME; then
al@21099 38 _ '%s is not running.' $NAME
al@21099 39 exit 1
al@21099 40 fi
al@21099 41 action 'Restarting %s: %s...' "$DESC" $NAME
al@21099 42 kill $(cat $PIDFILE)
al@21099 43 sleep 2
al@21099 44 $DAEMON $OPTIONS
al@21099 45 status
al@21099 46 ;;
al@21099 47 *)
al@21099 48 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
al@21099 49 newline
al@21099 50 exit 1
al@21099 51 ;;
slaxemulator@11682 52 esac
slaxemulator@11682 53
slaxemulator@11682 54 exit 0