mirror of
https://github.com/ergochat/ergo.git
synced 2025-05-30 03:17:42 +02:00
Updated debian (markdown)
parent
0639934cf1
commit
3a7ef61561
34
debian.md
34
debian.md
@ -1,24 +1,24 @@
|
|||||||
```init
|
```sh
|
||||||
#!/bin/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
|
# Install(unzip) oragono into /opt/oragono directory, and do installation instructors of oragono
|
||||||
# Copy oragono.init file into /etc/init.d
|
# Copy oragono.init file into /etc/init.d
|
||||||
#
|
#
|
||||||
# /etc/init.d/oragono.init
|
# /etc/init.d/oragono.init
|
||||||
# chmod +x oragono
|
# chmod +x oragono
|
||||||
# service oragono.init start
|
# service oragono.init start
|
||||||
#
|
#
|
||||||
# ref:
|
# ref:
|
||||||
# https://serverfault.com/questions/135859/is-there-a-standard-way-to-make-daemon-in-debian
|
# 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
|
# 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/
|
# http://big-elephants.com/2013-01/writing-your-own-init-scripts/
|
||||||
# https://chris-lamb.co.uk/posts/start-stop-daemon-exec-vs-startas
|
# https://chris-lamb.co.uk/posts/start-stop-daemon-exec-vs-startas
|
||||||
#
|
#
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
@ -51,16 +51,16 @@ proguser=root
|
|||||||
start() {
|
start() {
|
||||||
[ -x $exec ] || exit 5
|
[ -x $exec ] || exit 5
|
||||||
echo -n $"Starting $prog:\n"
|
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=$?
|
RETVAL=$?
|
||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
echo -n $"Stopping $prog:\n"
|
echo -n $"Stopping $prog:\n"
|
||||||
start-stop-daemon --stop --quiet --oknodo --pidfile $pid_file
|
start-stop-daemon --stop --quiet --oknodo --pidfile $pid_file
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
restart() {
|
restart() {
|
||||||
@ -90,7 +90,7 @@ case "$1" in
|
|||||||
$1
|
$1
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
#not tested, needs to fix
|
#not tested, needs to fix
|
||||||
rh_status
|
rh_status
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user