mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Allow to set default options for yunohost-api service
This commit is contained in:
parent
ce57a406c1
commit
7435ba7cee
2 changed files with 10 additions and 1 deletions
4
debian/yunohost-api.default
vendored
Normal file
4
debian/yunohost-api.default
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Override yunohost-api options.
|
||||||
|
# Example to log debug: DAEMON_OPTS="--debug"
|
||||||
|
#
|
||||||
|
#DAEMON_OPTS=""
|
7
debian/yunohost-api.init
vendored
7
debian/yunohost-api.init
vendored
|
@ -21,6 +21,11 @@ PIDFILE=/var/run/$NAME.pid
|
||||||
SCRIPTNAME=/etc/init.d/$NAME
|
SCRIPTNAME=/etc/init.d/$NAME
|
||||||
LOGFILE=/var/log/$NAME.log
|
LOGFILE=/var/log/$NAME.log
|
||||||
|
|
||||||
|
# Include yunohost-api defaults if available
|
||||||
|
if [ -r /etc/default/yunohost-api ]; then
|
||||||
|
. /etc/default/yunohost-api
|
||||||
|
fi
|
||||||
|
|
||||||
# Exit if the package is not installed
|
# Exit if the package is not installed
|
||||||
[ -x "$DAEMON" ] || exit 0
|
[ -x "$DAEMON" ] || exit 0
|
||||||
|
|
||||||
|
@ -45,7 +50,7 @@ do_start()
|
||||||
|| return 1
|
|| return 1
|
||||||
start-stop-daemon --start --background --make-pidfile --quiet --no-close \
|
start-stop-daemon --start --background --make-pidfile --quiet --no-close \
|
||||||
--pidfile $PIDFILE --exec $DAEMON -- \
|
--pidfile $PIDFILE --exec $DAEMON -- \
|
||||||
$DAEMON_ARGS >>$LOGFILE 2>&1 \
|
$DAEMON_OPTS >>$LOGFILE 2>&1 \
|
||||||
|| return 2
|
|| return 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue