diff --git a/servicectl b/servicectl index cf4f3a5..2f57acc 100755 --- a/servicectl +++ b/servicectl @@ -4,7 +4,7 @@ # # Pach systemd services file -SYSTEMD_UNITS_PATH="/usr/lib/systemd/system/" +SYSTEMD_UNITS_PATH="@PREFIX@/lib/systemd/system/" # Path locate this script DIR=$(dirname $(readlink -f $0)) @@ -12,12 +12,6 @@ DIR=$(dirname $(readlink -f $0)) # Path contents symlink on systemd units files SERVICECTL_ENABLED_PATH="$DIR/enabled/" -# Check is root -if [ $EUID -ne 0 ]; then - echo "You must run as root user" 2>&1 - exit 1 -fi - # Parse ini file. usage: parse $inifile $section $key # Return 0 on success, 1 if file cannot be opened, 2 if the given key cannot be found in the given section function parse()