[UPDATE] - TP 05
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/monithor-client/service.cfg
|
||||
Ip=$(echo $RemoteIp| cut -d":" -f1)
|
||||
|
||||
Exit () {
|
||||
|
||||
[[ "$1" == "root" ]] && echo "You have to be root ..."
|
||||
[[ "$1" == "Config" ]] && echo "Ip configuration will failed"
|
||||
|
||||
exit
|
||||
}
|
||||
@@ -16,8 +14,6 @@ if [[ $(id -u) != "0" ]]
|
||||
Exit root
|
||||
fi
|
||||
|
||||
[[ ! -z $(ifconfig | grep inet | awk '{print $2}' | grep $Ip) ]] && Exit Config
|
||||
|
||||
if [[ "$1" == "start" ]]
|
||||
then
|
||||
[[ -f /tmp/endmonitor ]] && rm -f /tmp/endmonitor
|
||||
|
||||
Reference in New Issue
Block a user