svc.sh: error handling and debug msg

This commit is contained in:
mollusk 2021-10-26 20:57:07 -07:00
parent da2f64b165
commit e2de8ac908

4
svc.sh
View File

@ -34,8 +34,12 @@ NC='\033[0m' # No Color
if [[ -f "/usr/bin/sv " ]];then if [[ -f "/usr/bin/sv " ]];then
serviceManager="runit" serviceManager="runit"
echo -e "${LGREEN}Detected Runit${NC}\n"
elif [[ -f "/usr/bin/systemctl" ]];then elif [[ -f "/usr/bin/systemctl" ]];then
serviceManager="systemd" serviceManager="systemd"
echo -e "${LGREEN}Detected SystemD${NC}\n"
else
echo -e "${LRED}no supported service manager found${NC}\n"
fi fi