We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15e7dc8 commit 4aa4d8fCopy full SHA for 4aa4d8f
1 file changed
runitctl
@@ -13,9 +13,14 @@ success() { echo -e "${GREEN}${1}${RESET}"; }
13
warn() { echo -e "${YELLOW}${1}${RESET}"; }
14
error() { echo -e "${RED}${1}${RESET}"; }
15
16
+if [ "$EUID" -ne 0 ]; then
17
+ echo -e "This command requires root privileges. Try: ${GREEN}sudo runitctl $*${RESET}"
18
+ exit 1
19
+fi
20
+
21
# Check if at least one argument is provided
22
if [ $# -lt 1 ]; then
- echo "Usage: runitctl ${GREEN}<action>${GREEN} [service]"
23
+ echo -e "Usage: runitctl ${GREEN}<action>${RESET} ${YELLOW}[service]${RESET}"
24
exit 1
25
fi
26
0 commit comments