Skip to content

Commit

Permalink
[enh] Allow to set default options for yunohost-api service
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelebleu committed Nov 12, 2015
1 parent ce57a40 commit 7435ba7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions debian/yunohost-api.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Override yunohost-api options.
# Example to log debug: DAEMON_OPTS="--debug"
#
#DAEMON_OPTS=""
7 changes: 6 additions & 1 deletion debian/yunohost-api.init
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
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
[ -x "$DAEMON" ] || exit 0

Expand All @@ -45,7 +50,7 @@ do_start()
|| return 1
start-stop-daemon --start --background --make-pidfile --quiet --no-close \
--pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS >>$LOGFILE 2>&1 \
$DAEMON_OPTS >>$LOGFILE 2>&1 \
|| return 2
}

Expand Down

0 comments on commit 7435ba7

Please sign in to comment.