Skip to content

Commit

Permalink
app-emulation/lxd: rework init.d file shutdown logic
Browse files Browse the repository at this point in the history
Signed-off-by: Joonas Niilola <[email protected]>
  • Loading branch information
juippis committed Feb 16, 2021
1 parent c919d31 commit 43b0f09
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app-emulation/lxd/files/lxd-4.0.0.initd
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ start() {
}

stop() {
ebegin "Stopping lxd service (but not containers)."
start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
rm -f ${PIDFILE}
eend ${?}
if [[ ${RC_GOINGDOWN} = YES ]] || [[ ${RC_REBOOT} = YES ]]; then
"${DAEMON}" shutdown
rm -f ${PIDFILE}
else
ebegin "Stopping lxd service (but not containers)."
start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
eend ${?}
fi
}

0 comments on commit 43b0f09

Please sign in to comment.