aboutsummaryrefslogtreecommitdiffstats
path: root/packages/cortexa57-poky-linux/neard/neard/latest.pkg_postinst
blob: 01fbcb18ae9ec947fb49d2133e7f1fb94cf021b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -e
if systemctl >/dev/null 2>/dev/null; then
	OPTS=""

	if [ -n "$D" ]; then
		OPTS="--root=$D"
	fi

	if [ "enable" = "enable" ]; then
		for service in neard.service; do
			systemctl ${OPTS} enable "$service"
		done
	fi

	if [ -z "$D" ]; then
		systemctl daemon-reload
		systemctl preset neard.service

		if [ "enable" = "enable" ]; then
			systemctl --no-block restart neard.service
		fi
	fi
fi