|
|
|
|
@ -1,13 +1,11 @@
|
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
ovpn_directory="/etc/openvpn/client/ovpn-enabled"
|
|
|
|
|
current_ovpn_path="/etc/openvpn/client/current.ovpn"
|
|
|
|
|
|
|
|
|
|
# TODO: Investigate better ways to check for rootness. This is just a courtesy message, though.
|
|
|
|
|
# Non-root users will not be able to do anything with this anyway.
|
|
|
|
|
if [ "$(whoami)" != "root" ]; then
|
|
|
|
|
if [ "$(id -u)" -ne 0 ]; then
|
|
|
|
|
echo "This script needs root privileges to interact with the openvpn service."
|
|
|
|
|
exit
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
prior_ovpn_path="$(readlink "${current_ovpn_path}")"
|
|
|
|
|
|