From 6c322d43f91dc7c3bdb1081a6c161b325c7dd38a Mon Sep 17 00:00:00 2001 From: Martin Blazik Date: Mon, 2 May 2022 08:24:14 +0200 Subject: [PATCH] Enable more actions for OpenVPN script --- scripts/openvpn-home.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/openvpn-home.sh b/scripts/openvpn-home.sh index c8c8cf5..f2baf4a 100755 --- a/scripts/openvpn-home.sh +++ b/scripts/openvpn-home.sh @@ -1,3 +1,9 @@ #!/bin/bash -sudo systemctl status openvpn@home.service +SERVICE_NAME="openvpn@home.service" + +if (( $# < 1 )); then + sudo systemctl status $SERVICE_NAME +else + sudo systemctl $1 $SERVICE_NAME +fi