Permalink
Browse files

debian startup script

  • Loading branch information...
1 parent e274b8c commit 35c0198282dac274fb3866c6e77b60eaa59e7df6 @ruzaq ruzaq committed Jun 18, 2013
Showing with 37 additions and 0 deletions.
  1. +37 −0 debian.init
View
@@ -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
+

0 comments on commit 35c0198

Please sign in to comment.