forked from brmlab/brmdoor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebian.init
37 lines (33 loc) · 986 Bytes
/
debian.init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/sh
### BEGIN INIT INFO
# Provides: brmdoor
# Required-Start: $local_fs $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Start brmdoor
# Description: start brmdoor screen
### END INIT INFO
NAME=brmdoor
PIDFILE=/var/run/$NAME.pid
case "$1" in
start)
logger poustim brmdoor rc skript
#sudo -u brmdoor /usr/bin/screen -dmS brmd -c /home/brmdoor/.screenrc-brmd
start-stop-daemon --start -v -b --pidfile $PIDFILE -x /bin/su \
-m --chdir /home/brmdoor -- - brmdoor \
-c " /usr/bin/screen -dmS brmd -c /home/brmdoor/.screenrc-brmd" \
|| return 2
#/bin/su - brmdoor -c 'cd /home/brmdoor; /usr/bin/screen -dmS brmd -c /home/brmdoor/.screenrc-brmd'
;;
stop|restart|force-reload)
# No-op
;;
status)
# No-op
;;
*)
echo "Usage: $NAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac