Skip to content

Commit

Permalink
Keep only systemd reload
Browse files Browse the repository at this point in the history
  • Loading branch information
deniszh authored and Civil committed May 18, 2021
1 parent 8b2af16 commit 31bf91d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions contrib/carbonapi/fpm/carbon-user-systemd-reload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@ fi

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

# reload systemd
[[ -e /bin/systemctl ]] && /bin/systemctl daemon-reload ||:

0 comments on commit 31bf91d

Please sign in to comment.