Commit 1d3b0e81 authored by Seblu's avatar Seblu
Browse files

checkservies: require root later

This allow to get usage without running checkservices as root
parent 303231dc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ unset GREP_OPTIONS
# Systemd cgroup path
systemd_cgroup_base_path='/sys/fs/cgroup/systemd'

(( $UID != 0 )) && echo 'You need to be root' && exit 1

if [[ -t 1 ]]; then
	shopt -s xpg_echo
@@ -83,6 +82,9 @@ shift $((OPTIND - 1));
# avoid to be sighup'ed by interactive shell
trap '' SIGHUP

# from now, we need to be root
(( $UID != 0 )) && echo 'You need to be root' && exit 1

# call pacdiff
[[ -z $no_pacdiff ]] && pacdiff