Browse Source

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

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 6 years ago
parent
commit
1cb0e7853b
2 changed files with 17 additions and 0 deletions
  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