From 925ccfa9b8e0b1f903cb0458c91d158a74a1b2f6 Mon Sep 17 00:00:00 2001 From: Pavel Muhortov Date: Sun, 7 Jan 2024 15:45:16 +0300 Subject: [PATCH] added check dependencies --- ovpn-client-management.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ovpn-client-management.sh b/ovpn-client-management.sh index 9d1fc0b..3aa6496 100644 --- a/ovpn-client-management.sh +++ b/ovpn-client-management.sh @@ -410,6 +410,15 @@ logs=/dev/null # if checkroot; then + if ! command -v chpasswd &> /dev/null || \ + ! command -v /usr/sbin/openvpn &> /dev/null || \ + ! command -v /etc/openvpn/easy-rsa/easyrsa &> /dev/null || \ + ! command -v tar &> /dev/null || \ + ! command -v /usr/local/bin/sendmail.py &> /dev/null || \ + ! command -v python3 &> /dev/null || \ + ! command -v curl &> /dev/null; then + execerror "Not found dependencies" + fi getconfig if [ "${clienttodo}" == "add" ] && \ [ -n "${clientname}" ] && \