-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSERVMan
More file actions
28 lines (26 loc) · 706 Bytes
/
SERVMan
File metadata and controls
28 lines (26 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
user=$(whoami)
#Checking for user permissions
if [ "$user" != "root" ]; then
echo ${red}"This program must be run as root ${textreset}"
echo "Exiting"
exit
else
echo "Running Program"
fi
items=(1 "Enable SM on Boot"
2 "Disable SM on Boot"
3 "Update Module"
)
while choice=$(dialog --title "$TITLE" \
--backtitle "System Management" \
--menu "Please select" 20 40 3 "${items[@]}" \
2>&1 >/dev/tty)
do
case $choice in
1) /root/.servman/ServerManager/sm-enable;;
2) /root/.servman/ServerManager/sm-disable;;
3) /root/.servman/ServerManager/update-server-manager;;
esac
done
clear # clear after user pressed Cancel