I have got openvpn working with PIA vpn, but i am having some issues trying to get a startup script working for the vpn.
I am trying to run it on Rasbian Jessie (latest version) for my raspberry pi 3b.
I am in "su mode" using the command:
Code: Select all
sudo su
Here is the script i have pasted to the file "VPNConnection":
Code: Select all
#! /bin/sh
# /etc/init.d/VPNConnection
### BEGIN INIT INFO
# Short-Description: Simple script to start a program at boot
# Description: A simple script from Dotslashnotes
### END INIT INFO
# If you want a command to always run, put it here
# Carry out specific functions when asked to by the system
case “$1” in
start)
echo “Starting VPN Connection”
# Connect to the VPN
cd /etc/openvpn
sudo openvpn Sweden.ovpn
;;
stop)
echo “Stopping VPN Connection”
# Disconnect
killall openvpn
;;
*)
echo “Usage: /etc/init.d/VPNConnection {start|stop}”
exit 1
;;
esac
Code: Select all
sudo /etc/init.d/VPNConnection start
Code: Select all
sudo /etc/init.d/VPNConnection: stop": not found
- Buzz