12 lines
219 B
Bash
Executable file
12 lines
219 B
Bash
Executable file
#!/bin/sh
|
|
PROFILE=$(hostname)
|
|
|
|
sudo systemctl stop openvpn-client@$PROFILE.service
|
|
|
|
if [[ $1 = "on" ]]
|
|
then
|
|
sudo systemctl start openvpn-client@$PROFILE.service
|
|
echo "$PROFILE started"
|
|
else
|
|
echo "All stopped."
|
|
fi
|