22 lines
630 B
Text
Executable file
22 lines
630 B
Text
Executable file
. /etc/vpnsecret
|
|
|
|
/bin/sleep 10
|
|
|
|
/bin/rm -f /var/log/wget
|
|
/usr/bin/wget -O/etc/hosts https://admin360.kumi.host/hosts --post-data "secret=$SECRET" --no-check-certificate >/var/log/wget 2>&1
|
|
|
|
/usr/sbin/openvpn /etc/openvpn/client.conf &
|
|
|
|
ipaddr(){
|
|
if="${1:-br-VPN360}"
|
|
result=$(/sbin/ip -o -4 addr show dev "${if}" | /bin/sed 's/^.*inet // ; s/\/...*$//')
|
|
/usr/bin/printf %s "${result}"
|
|
tty -s && printf "\n"
|
|
}
|
|
|
|
while [ True ]; do
|
|
/bin/sleep 60;
|
|
/bin/rm /var/log/wget
|
|
/usr/bin/wget -O- https://admin360.kumi.host/heartbeat --post-data "secret=$SECRET&ip=$(ipaddr)" --no-check-certificate 2>/var/log/wget | /bin/ash;
|
|
done
|
|
|