Explorar o código

pppoe: Add cronjob to check and restart PPP session every 5 minutes.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm %!s(int64=6) %!d(string=hai) anos
pai
achega
1cb0e7853b
Modificáronse 2 ficheiros con 17 adicións e 0 borrados
  1. 16 0
      pppoe/ff_fix_ppp
  2. 1 0
      pppoe/ff_fix_ppp.cron

+ 16 - 0
pppoe/ff_fix_ppp

@@ -0,0 +1,16 @@
+#!/bin/sh
+
+#
+# Check for pppd
+if pidof pppd >/dev/null; then
+        # Ok processes are running
+        exit 0
+fi
+
+logger -t fix_inet "Restarting internet internet connection."
+
+poff tkom >/dev/null || true
+
+sleep 1
+
+pon tkom

+ 1 - 0
pppoe/ff_fix_ppp.cron

@@ -0,0 +1 @@
+*/5 *  * * *	root	/usr/local/sbin/ff_fix_ppp