I am connecting from my BeagleBone running Debian to a cellular modem.
In order to connect, I enter command pppd file /etc/ppp/peers/zdial &
Now, in order to execute this command on boot-up, I created a script start-ppp.sh which runs this command as below.
I then create and enable a service ppp-connect.service as below. sudo systemctl enable ppp-connect.
I would expect this service to run on boot-up and automatically connect to my modem but it doesn't work.
However, If I manually start the service with sudo systemctl start ppp-connect , then my service starts and I can connect to the modem.
Why is it that it does not connect on boot-up automatically? Can anyone see something obvious that I am doing wrong. Perhaps it's something to do with not entering the password for sudo during boot-up. I'm not sure.
#!/bin/sh -e sudo -H -u debian pppd file /etc/ppp/ppers/zdial &
[Unit] Description=ppp_service ConditionPathExists=/dev/ttyACM0 [Service] Type=forking ExecStart=/bin/sh /home/debian/start-ppp.sh Restart=always RestartSec=60 [Install] WantedBy=multi-user.target