mirror of
https://github.com/brmlab/brmdoor.git
synced 2025-06-07 19:24:01 +02:00
debian startup script
This commit is contained in:
parent
e274b8c105
commit
35c0198282
1 changed files with 37 additions and 0 deletions
37
debian.init
Normal file
37
debian.init
Normal file
|
@ -0,0 +1,37 @@
|
|||
#! /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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue