bundles/pppd: silence restart-pppoe-if-no-public-ip

This commit is contained in:
Franzi 2020-12-18 06:32:18 +01:00
parent e33af1c845
commit ecb7a93073
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -16,7 +16,6 @@ except:
last_restart = 0
if now-3600 < last_restart:
print('Last restart is less than an hour ago, exiting ...')
exit(0)
ifaces = set()
@ -41,6 +40,6 @@ if not system_has_public_ip:
run(['systemctl', 'restart', 'pppoe'])
with open('/var/tmp/pppd-last-restart.status', 'w') as f:
f.write(now)
f.write(str(now))
print('pppoe.service has been restarted')