From 3a7ef615612b1ddea9bddc0bb962e591f9b5c8d3 Mon Sep 17 00:00:00 2001 From: Zaher Dirkey Date: Wed, 21 Feb 2018 23:45:49 +0200 Subject: [PATCH] Updated debian (markdown) --- debian.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/debian.md b/debian.md index 036964c..d190c3d 100644 --- a/debian.md +++ b/debian.md @@ -1,24 +1,24 @@ -```init +```sh #!/bin/sh # -# https://github.com/oragono/oragono +# https://github.com/oragono/oragono # -# this file based on https://github.com/jirihnidek/daemon +# this file based on https://github.com/jirihnidek/daemon # -# For install oragono as service in Debian/Ubuntu +# For install oragono as service in Debian/Ubuntu # -# Install(unzip) oragono into /opt/oragono directory, and do installation instructors of oragono -# Copy oragono.init file into /etc/init.d -# +# Install(unzip) oragono into /opt/oragono directory, and do installation instructors of oragono +# Copy oragono.init file into /etc/init.d +# # /etc/init.d/oragono.init -# chmod +x oragono +# chmod +x oragono # service oragono.init start # -# ref: -# https://serverfault.com/questions/135859/is-there-a-standard-way-to-make-daemon-in-debian -# https://stackoverflow.com/questions/8124345/call-to-daemon-in-a-etc-init-d-script-is-blocking-not-running-in-background -# http://big-elephants.com/2013-01/writing-your-own-init-scripts/ -# https://chris-lamb.co.uk/posts/start-stop-daemon-exec-vs-startas +# ref: +# https://serverfault.com/questions/135859/is-there-a-standard-way-to-make-daemon-in-debian +# https://stackoverflow.com/questions/8124345/call-to-daemon-in-a-etc-init-d-script-is-blocking-not-running-in-background +# http://big-elephants.com/2013-01/writing-your-own-init-scripts/ +# https://chris-lamb.co.uk/posts/start-stop-daemon-exec-vs-startas # ### BEGIN INIT INFO @@ -51,16 +51,16 @@ proguser=root start() { [ -x $exec ] || exit 5 echo -n $"Starting $prog:\n" - start-stop-daemon --start --quiet --oknodo --background -m --pidfile $pid_file --chdir $app_dir --exec $app -- $options + start-stop-daemon --start --quiet --oknodo --background -m --pidfile $pid_file --chdir $app_dir --exec $app -- $options RETVAL=$? return $RETVAL } stop() { echo -n $"Stopping $prog:\n" - start-stop-daemon --stop --quiet --oknodo --pidfile $pid_file + start-stop-daemon --stop --quiet --oknodo --pidfile $pid_file RETVAL=$? - return $RETVAL + return $RETVAL } restart() { @@ -90,7 +90,7 @@ case "$1" in $1 ;; status) -#not tested, needs to fix +#not tested, needs to fix rh_status ;; *)