From 15632a60df6a92318bbc001508b5190ff5a75e8c Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 31 Oct 2023 15:19:01 +0000 Subject: [PATCH] Create system debug log dir, copy shell scripts to destination --- installers/common.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/installers/common.sh b/installers/common.sh index 34975cbf..3e124d04 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -539,12 +539,19 @@ function _create_openvpn_scripts() { _install_log "Creating OpenVPN control scripts" sudo mkdir $raspap_dir/openvpn || _install_status 1 "Unable to create directory '$raspap_dir/openvpn'" - # Move service auth control & logging shell scripts + _install_log "Creating RaspAP debug log control script" + sudo mkdir $raspap_dir/system || _install_status 1 "Unable to create directory '$raspap_dir/system'" + + # Move service auth control, logging and debug shell scripts sudo cp "$webroot_dir/installers/"configauth.sh "$raspap_dir/openvpn" || _install_status 1 "Unable to move auth control script" sudo cp "$webroot_dir/installers/"openvpnlog.sh "$raspap_dir/openvpn" || _install_status 1 "Unable to move logging script" + sudo cp "$webroot_dir/installers/"debuglog.sh "$raspap_dir/system" || _install_status 1 "Unable to move debug logging script" # Restrict script execution to root user sudo chown -c root:root "$raspap_dir/openvpn/"*.sh || _install_status 1 "Unable change owner and/or group" sudo chmod 750 "$raspap_dir/openvpn/"*.sh || _install_status 1 "Unable to change file permissions" + sudo chown -c root:root "$raspap_dir/system/"*.sh || _install_status 1 "Unable change owner and/or group" + sudo chmod 750 "$raspap_dir/system/"*.sh || _install_status 1 "Unable to change file permissions" + _install_status 0 }