3 DEFAULT
="/etc/default/miau"
4 OPTIONS
="-d /etc/miau/"
5 LOG_DIR
="/var/log/miau"
6 ERR_LOG
="$LOG_DIR/error.log"
7 OUT_LOG
="$LOG_DIR/miau.log"
9 [ -f $DEFAULT ] && .
$DEFAULT
10 [ "$ENABLE_MIAU" = "yes" ] ||
exit 0
14 [ -f /var
/run
/miau.pid
] && echo "[ERROR] miau is running"
15 [ -f /var
/run
/miau.pid
] && exit 0
16 [ -d /var
/run
] || mkdir
-p /var
/run
17 [ -d $LOG_DIR ] || mkdir
-p $LOG_DIR
18 /usr
/bin
/miau
-f $OPTIONS > $OUT_LOG 2> $ERR_LOG &
21 [ -d /proc
/$PID ] && echo $PID > /var
/run
/miau.pid
22 [ -d /proc
/$PID ] ||
echo "[ERROR] Unable to run miau as a daemon"
25 [ -f /var
/run
/miau.pid
] && kill $
(cat /var
/run
/miau.pid
) >/dev
/null
2>&1 && rm /var
/run
/miau.pid
28 echo "usage: $0 (start|stop)"
This page took 0.055018 seconds and 5 git commands to generate.