浏览代码

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

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 6 年之前
父节点
当前提交
1cb0e7853b
共有 2 个文件被更改,包括 17 次插入0 次删除
  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