Concurrently start ppp links and periodically check link state. Restart links if down.
- Linux
pppd
Tested with
Rocky Linux 9.6 x86_64andpppd version 2.4.9.
- Start all links concurrently.
- Check number of running links at regular intervals.
- Restart all links if less than a certain number of links are alive.
- Force restart all links at regular intervals.
- Reads
config.jsonfrom CWD. - Config format:
{ "links": [ { "tag": "isp0", "ttyname": "eth0", "user": "<user>", "password": "<password>", "ifname": "ppp0" }, { "tag": "isp1", "ttyname": "eth1", "user": "<user>", "password": "<password>", "ifname": "ppp1" }, { "tag": "isp2", "ttyname": "eth2", "user": "<user>", "password": "<password>", "ifname": "ppp2" } ], "daemon": { "run_dir": "/var/run", "expected": 3, "enabled": true, "check_interval": 300, "force_restart": false, "force_restart_interval": 86400 } } linkstagUnique tag of link.ttynameDevice used by PPP link.userName for authentication.passwordPassword for authentication.ifnameName of PPP network interface.
daemonenabledEnable daemon mode.run_dirRuntime variable directory - where[ifname].pidfiles are located.expectedExpected number of links. Will trigger restart if less are alive.check_intervalCheck interval in seconds. Minimum300.force_restartEnable force restart.force_restart_intervalForce restart interval in seconds. Must be greater thancheck_interval.
- Generates JSON config for many link with the same account.
- Prints to
stdout.Usage: pppcm-cfg-gen <tag-prefix> <ttyname-prefix> <user> <password> <ifname-prefix> <link-count>