summaryrefslogtreecommitdiff
path: root/autoscripts/postinst-init-restart
blob: d27cc8dc8e0c539d861165d93b5e6f7263ff3d97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if [ -x "/etc/init.d/#SCRIPT#" ]; then
	# In case this system is running systemd, we need to ensure that all
	# necessary tmpfiles (if any) are created before starting.
	if [ -d /run/systemd/system ] ; then
		systemd-tmpfiles --create >/dev/null || true
	fi

	update-rc.d #SCRIPT# #INITPARMS# >/dev/null
	if [ -n "$2" ]; then
		_dh_action=restart
	else
		_dh_action=start
	fi
	invoke-rc.d #SCRIPT# $_dh_action || #ERROR_HANDLER#
fi