Browse Source

Added service exists or not check

old-stable
gau1991 11 years ago
parent
commit
33c8a84fb0
  1. 3
      src/lib/ee_lib_service.sh

3
src/lib/ee_lib_service.sh

@ -7,6 +7,8 @@
function ee_lib_service()
{
for ee_service_name in ${@:1:$(($#-1))}; do
dpkg --get-selections | grep -v deinstall | grep $ee_service_name &>> $EE_COMMAND_LOG
if [ $? -eq 0 ];then
# Display message
ee_lib_echo "Executing service $ee_service_name ${@: -1}, please wait..."
@ -38,5 +40,6 @@ function ee_lib_service()
service $ee_service_name ${@: -1} &>> $EE_COMMAND_LOG \
|| ee_lib_error "Unable to execute service $ee_service_name ${@: -1}, exit status = " $?
fi
fi
done
}

Loading…
Cancel
Save