···41 return 1
42}
4344-VERSION=$(@coreutils@/bin/basename $0)" ver. 0.91-ubuntu1"
45USAGE="Usage: "$(@coreutils@/bin/basename $0)" < option > | --status-all | \
46[ service_name [ command | --full-restart ] ]"
47SERVICE=
···133 esac
134done
135136-# Operate against system upstart, not session
137-unset UPSTART_SESSION
138-if [ -r "/etc/init/${SERVICE}.conf" ] && which initctl >/dev/null \
139- && initctl version 2>/dev/null | grep -q upstart \
140- && initctl status ${SERVICE} 2>/dev/null 1>/dev/null
141-then
142- # Upstart configuration exists for this job and we're running on upstart
143- case "${ACTION}" in
144- start|stop|status|reload)
145- # Action is a valid upstart action
146- exec ${ACTION} ${SERVICE} ${OPTIONS}
147- ;;
148- restart|force-reload)
149- # Map restart to the usual sysvinit behavior.
150- # Map force-reload to restart as per Debian policy 9.3.2,
151- # since there is no way to know if "reload" is supported
152- stop ${SERVICE} ${OPTIONS} || :
153- exec start ${SERVICE} ${OPTIONS}
154- ;;
155- esac
156-fi
157-158-159run_via_sysvinit() {
160 # Otherwise, use the traditional sysvinit
161 if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
···198 fi
199200 case "${ACTION}" in
201- restart|status)
202 exec systemctl $sctl_args ${ACTION} ${UNIT}
203 ;;
204 start|stop)
···214 exec systemctl $sctl_args ${ACTION} ${UNIT}
215 ;;
216 reload)
217- _canreload="$(SYSTEMCTL -p CanReload show ${UNIT} 2>/dev/null)"
218 if [ "$_canreload" = "CanReload=no" ]; then
219 # The reload action falls back to the sysv init script just in case
220 # the systemd service file does not (yet) support reload for a
···41 return 1
42}
4344+VERSION=$(@coreutils@/bin/basename $0)" ver. 19-04"
45USAGE="Usage: "$(@coreutils@/bin/basename $0)" < option > | --status-all | \
46[ service_name [ command | --full-restart ] ]"
47SERVICE=
···133 esac
134done
13500000000000000000000000136run_via_sysvinit() {
137 # Otherwise, use the traditional sysvinit
138 if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
···175 fi
176177 case "${ACTION}" in
178+ restart|status|try-restart)
179 exec systemctl $sctl_args ${ACTION} ${UNIT}
180 ;;
181 start|stop)
···191 exec systemctl $sctl_args ${ACTION} ${UNIT}
192 ;;
193 reload)
194+ _canreload="$(systemctl -p CanReload show ${UNIT} 2>/dev/null)"
195 if [ "$_canreload" = "CanReload=no" ]; then
196 # The reload action falls back to the sysv init script just in case
197 # the systemd service file does not (yet) support reload for a