Skip to content

Commit 31bf91d

Browse files
deniszhCivil
authored andcommitted
Keep only systemd reload
1 parent 8b2af16 commit 31bf91d

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

contrib/carbonapi/fpm/carbon-user-systemd-reload.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ fi
3434

3535
if [ ! -e "${CONF}" ]; then
3636
echo "For use this software you have to create ${CONF} file. You could use /usr/share/carbonapi/carbonapi.example.yaml as default"
37-
else
38-
# On debian jessie (systemd 215) it fails if symlink already exists
39-
systemctl is-enabled carbonapi || systemctl enable carbonapi
40-
# Check if systemd is up and running, e.g. not in chroot
41-
if systemctl 1>/dev/null 2>&1; then
42-
systemctl daemon-reload
43-
systemctl restart carbonapi.service
44-
fi
45-
fi
37+
fi
38+
39+
# reload systemd
40+
[[ -e /bin/systemctl ]] && /bin/systemctl daemon-reload ||:

0 commit comments

Comments
 (0)