[UPDATE] - TP 05

This commit is contained in:
2022-05-02 21:09:49 +02:00
parent 8fd4776f92
commit 2ff5c979b5
6 changed files with 18 additions and 32 deletions
@@ -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