From 593c5f74a5b49adf2b4b3ba4fa856f4c82105bb6 Mon Sep 17 00:00:00 2001 From: Elias Probst Date: Tue, 24 Sep 2013 02:01:48 +0200 Subject: [PATCH] [gentoo] added support for systemd on Gentoo. --- bootstrap-salt.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a0f7113..550878d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2851,8 +2851,13 @@ install_gentoo_restart_daemons() { [ $fname = "master" ] && [ $_INSTALL_MASTER -eq $BS_FALSE ] && continue [ $fname = "syndic" ] && [ $_INSTALL_SYNDIC -eq $BS_FALSE ] && continue - /etc/init.d/salt-$fname stop > /dev/null 2>&1 - /etc/init.d/salt-$fname start + if [ -d "/run/systemd/system" ]; then + systemctl stop salt-$fname > /dev/null 2>&1 + systemctl start salt-$fname.service + else + /etc/init.d/salt-$fname stop > /dev/null 2>&1 + /etc/init.d/salt-$fname start + fi done }