I have a working bash script that starts the easyvpn snap with a working config file. I want to run this script on boot so that my ubuntu core device autoconnects to my vpn on boot.
My Bash Script in /home/alexlanganke/:
#!/bin/bash
echo "easy-openvpn.connect-server /home/alexlanganke/vpnconfig.ovpn" | bash
This file is naturally been made executable and has been tested successfully on its own.
My systemd Service file in /etc/systemd/system/:
[Unit]
Description=VPN Autostart
[Service]
ExecStart=/home/alexlanganke/autostart_vpn.sh
[Install]
WantedBy=multi-user.target
The Systemd service has been started and enabled. Do you by chance see what I am doing wrong or missing?
journalctl -u output:
Mar 27 16:50:14 localhost.localdomain autostart_vpn.sh[1373]: bash: line 1: easy-openvpn.connect-server: command not found
Looks to me as if the easyvpn command is not known to bash when run via systemd. Wrong path?