···4141 return 1
4242}
43434444-VERSION=$(@coreutils@/bin/basename $0)" ver. 0.91-ubuntu1"
4444+VERSION=$(@coreutils@/bin/basename $0)" ver. 19-04"
4545USAGE="Usage: "$(@coreutils@/bin/basename $0)" < option > | --status-all | \
4646[ service_name [ command | --full-restart ] ]"
4747SERVICE=
···133133 esac
134134done
135135136136-# Operate against system upstart, not session
137137-unset UPSTART_SESSION
138138-if [ -r "/etc/init/${SERVICE}.conf" ] && which initctl >/dev/null \
139139- && initctl version 2>/dev/null | grep -q upstart \
140140- && initctl status ${SERVICE} 2>/dev/null 1>/dev/null
141141-then
142142- # Upstart configuration exists for this job and we're running on upstart
143143- case "${ACTION}" in
144144- start|stop|status|reload)
145145- # Action is a valid upstart action
146146- exec ${ACTION} ${SERVICE} ${OPTIONS}
147147- ;;
148148- restart|force-reload)
149149- # Map restart to the usual sysvinit behavior.
150150- # Map force-reload to restart as per Debian policy 9.3.2,
151151- # since there is no way to know if "reload" is supported
152152- stop ${SERVICE} ${OPTIONS} || :
153153- exec start ${SERVICE} ${OPTIONS}
154154- ;;
155155- esac
156156-fi
157157-158158-159136run_via_sysvinit() {
160137 # Otherwise, use the traditional sysvinit
161138 if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
···198175 fi
199176200177 case "${ACTION}" in
201201- restart|status)
178178+ restart|status|try-restart)
202179 exec systemctl $sctl_args ${ACTION} ${UNIT}
203180 ;;
204181 start|stop)
···214191 exec systemctl $sctl_args ${ACTION} ${UNIT}
215192 ;;
216193 reload)
217217- _canreload="$(SYSTEMCTL -p CanReload show ${UNIT} 2>/dev/null)"
194194+ _canreload="$(systemctl -p CanReload show ${UNIT} 2>/dev/null)"
218195 if [ "$_canreload" = "CanReload=no" ]; then
219196 # The reload action falls back to the sysv init script just in case
220197 # the systemd service file does not (yet) support reload for a