[ENHANCEMENT] Server log level option
This commit is contained in:
parent
56515f3515
commit
0f0f1484fa
1 changed files with 28 additions and 2 deletions
|
|
@ -326,6 +326,15 @@ else
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "Choose server log level:"
|
||||||
|
echo " 1) Normal (verbose level 3)"
|
||||||
|
echo " 2) High (verbose level 4)"
|
||||||
|
echo " 3) Debug (verbose level 6)"
|
||||||
|
echo " 4) Off (verbose level 0, logs to /dev/null)"
|
||||||
|
while [[ $SERVER_LOG_LEVEL != "1" && $SERVER_LOG_LEVEL != "2" && $SERVER_LOG_LEVEL != "3" && $SERVER_LOG_LEVEL != "4" ]]; do
|
||||||
|
read -p "Server log level [1-4]: " -e -i 1 SERVER_LOG_LEVEL
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
echo "Finally, tell me a name for the client certificate and configuration"
|
echo "Finally, tell me a name for the client certificate and configuration"
|
||||||
while [[ $CLIENT = "" ]]; do
|
while [[ $CLIENT = "" ]]; do
|
||||||
echo "Please, use one word only, no special characters"
|
echo "Please, use one word only, no special characters"
|
||||||
|
|
@ -566,9 +575,26 @@ auth SHA256
|
||||||
$CIPHER
|
$CIPHER
|
||||||
tls-server
|
tls-server
|
||||||
tls-version-min 1.2
|
tls-version-min 1.2
|
||||||
tls-cipher TLS-DHE-RSA-WITH-AES-128-GCM-SHA256
|
tls-cipher TLS-DHE-RSA-WITH-AES-128-GCM-SHA256" >> /etc/openvpn/server.conf
|
||||||
status openvpn.log
|
case $SERVER_LOG_LEVEL in
|
||||||
|
1) # Normal
|
||||||
|
echo "status openvpn.log
|
||||||
verb 3" >> /etc/openvpn/server.conf
|
verb 3" >> /etc/openvpn/server.conf
|
||||||
|
;;
|
||||||
|
2) # High
|
||||||
|
echo "status openvpn.log
|
||||||
|
verb 4" >> /etc/openvpn/server.conf
|
||||||
|
;;
|
||||||
|
3) # Debug
|
||||||
|
echo "status openvpn.log
|
||||||
|
verb 6" >> /etc/openvpn/server.conf
|
||||||
|
;;
|
||||||
|
4) # Off
|
||||||
|
echo "log /dev/null
|
||||||
|
status /dev/null
|
||||||
|
verb 0" >> /etc/openvpn/server.conf
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Create the sysctl configuration file if needed (mainly for Arch Linux)
|
# Create the sysctl configuration file if needed (mainly for Arch Linux)
|
||||||
if [[ ! -e $SYSCTL ]]; then
|
if [[ ! -e $SYSCTL ]]; then
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue