Error on rasbian Jessie open vpn start script: sudo /etc/init.d/VPNConnection: stop": not found
Posted: Sat Jul 30, 2016 12:19 pm
Hi.
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:
The script i am trying to get to work is from the following guide: https://dotslashnotes.wordpress.com/201 ... -pi-linux/
Here is the script i have pasted to the file "VPNConnection":
When i run it using the command:
I get this following error:
Any help i can get i very appreciated! And i apologize for any misunderstanding, as i am quite new to this (also please let me know if this is posted in the wrong forum section).
- Buzz
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
