28 lines
722 B
Bash
28 lines
722 B
Bash
#!/bin/sh
|
|
|
|
### BEGIN INIT INFO
|
|
# Provides: tracd
|
|
# Required-Start: $remote_fs $network
|
|
# Required-Stop: $remote_fs $network
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Description: Trac Server
|
|
# X-Author: Adrian Kousz, 2014
|
|
### END INIT INFO
|
|
|
|
USER=trac
|
|
GROUP=$(id -gn $USER)
|
|
PIDFILE=/run/tracd.pid
|
|
PRIO=5
|
|
UMASK=02
|
|
|
|
#CMD="tracd -d --umask=$UMASK --pidfile='$PIDFILE' --user=$USER --group=$GROUP \
|
|
# --basic-auth='*,/home/data/trac/htpasswd,Arterop - Login' \
|
|
# -p 8000 -e /home/data/trac"
|
|
|
|
# With AccountManagerPlugin:
|
|
CMD="tracd -d --umask=$UMASK --pidfile='$PIDFILE' --user=$USER --group=$GROUP \
|
|
-p 8000 -e /home/data/trac"
|
|
|
|
/etc/inithelpers/daemon.sh "$1" "$PIDFILE" "$CMD" "$PRIO" "$UMASK"
|