From 0176f7194460be512cc200ca4bf1212a50999175 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 31 Oct 2023 14:38:45 +0000 Subject: [PATCH 01/17] Initial commit --- installers/debuglog.sh | 272 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100755 installers/debuglog.sh diff --git a/installers/debuglog.sh b/installers/debuglog.sh new file mode 100755 index 00000000..09c82e59 --- /dev/null +++ b/installers/debuglog.sh @@ -0,0 +1,272 @@ +#!/bin/bash +# +# RaspAP Debug log generator +# Author: @billz +# Author URI: https://github.com/billz/ +# License: GNU General Public License v3.0 +# License URI: https://github.com/raspap/raspap-webgui/blob/master/LICENSE +# +# Typically used in an ajax call from the RaspAP UI, this utility may also +# be invoked directly to generate a detailed system debug log. +# +# Usage: debuglog.sh [options] +# +# OPTIONS: +# -p, --path Overrides the debug logfile write path (/tmp) +# -i, --install Overrides the default RaspAP install location (/var/www/html) +# +# NOTE +# Detailed system information is gathered for debugging and/or troubleshooting +# purposes only. Passwords or other sensitive data are NOT included. +# +# You are not obligated to bundle the LICENSE file with your RaspAP projects as long +# as you leave these references intact in the header comments of your source files. + +# Exit on error +set -o errexit +# Exit on error inside functions +set -o errtrace +# Turn on traces, disabled by default +# set -o xtrace + +# Set defaults +readonly RASPAP_DIR="/etc/raspap" +readonly DNSMASQ_D_DIR="/etc/dnsmasq.d" +readonly RASPAP_DHCDPCD="/etc/dhcpcd.conf" +readonly RASPAP_HOSTAPD="$RASPAP_DIR/hostapd.ini" +readonly RASPAP_PROVIDER="$RASPAP_DIR/provider.ini" +readonly RASPAP_LOGFILE="raspap_debug.log" +readonly RASPAP_DEBUG_VERSION="1.0" + +readonly PREAMBLE=" + 888888ba .d888888 888888ba + 88 8b d8 88 88 8b + a88aaaa8P' .d8888b. .d8888b. 88d888b. 88aaaaa88a a88aaaa8P + 88 8b. 88 88 Y8ooooo. 88 88 88 88 88 + 88 88 88. .88 88 88. .88 88 88 88 + dP dP 88888P8 88888P 88Y888P 88 88 dP + 88 + dP Debug Log Generator $RASPAP_DEBUG_VERSION + +This process collects debug and troubleshooting information about your RaspAP installation. +It is intended to assist users with a self-diagnosis of their installations, as well as +provide useful information as a starting point for others to assist with troubleshooting. +Debug log information contains the RaspAP version, current state and configuration of AP +related services, relevant installed package versions, Linux kernel version and local +networking configuration details. + +If you wish to share your debug info, paste the output to one of the following: + https://pastebin.com/ + https://paste.ubuntu.com/ + +Please do NOT paste the log in its entirety to RaspAP's discussions, issues or other +support channels. Use one of the above links instead. + +DISCLAIMER: This log DOES contain details about your system, including networking +settings. However, NO passwords or other sensitive data are included in the debug output. +=========================================================================================" + +function _main() { + _parse_params "$@" + _initialize + _output_preamble + _generate_log +} + +function _parse_params() { + # default option values + logfile_path="/tmp" + install_dir="/var/www/html" + + while :; do + case "${1-}" in + -p|--path) + logfile_path="$2" + shift + ;; + -i|--install) + install_dir="$2" + shift + ;; + -*|--*) + echo "Unknown option: $1" + _usage + exit 1 + ;; + *) + break + ;; + esac + shift + done +} + +function _generate_log() { + timestamp=$(date) + _log_write "Debug log generation started at ${timestamp}" + _log_write "Writing log to ${logfile_path}/${RASPAP_LOGFILE}" + + _system_info + _packages_info + _raspap_info + _dnsmasq_info + _interface_info + _routing_info + _iw_dev_info + _iw_reg_info + _systemd_info + + _log_write "RaspAP debug log generation complete." + exit 0 +} + +function _system_info() { + local model=$(tr -d '\0' < /proc/device-tree/model) + local system_uptime=$(uptime | awk -F'( |,|:)+' '{if ($7=="min") m=$6; else {if ($7~/^day/){if ($9=="min") {d=$6;m=$8} else {d=$6;h=$8;m=$9}} else {h=$6;m=$7}}} {print d+0,"days,",h+0,"hours,",m+0,"minutes"}') + local free_mem=$(free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}') + _log_separator "SYSTEM INFO" + _log_write "Hardware: ${model}" + _log_write "Detected OS: ${DESC} ${LONG_BIT}-bit" + _log_write "Kernel: ${KERNEL}" + _log_write "System Uptime: ${system_uptime}" + _log_write "Memory Usage: ${free_mem}%" +} + +function _packages_info() { + local php_version=$(php -v | grep -oP "PHP \K[0-9]+\.[0-9]+.*") + local dnsmasq_version=$(dnsmasq -v | grep -oP "Dnsmasq version \K[0-9]+\.[0-9]+") + local dhcpcd_version=$(dhcpcd --version | grep -oP '\d+\.\d+\.\d+') + local lighttpd_version=$(lighttpd -v | grep -oP '(\d+\.\d+\.\d+)') + local vnstat_version=$(vnstat -v | grep -oP "vnStat \K[0-9]+\.[0-9]+") + _log_separator "INSTALLED PACKAGES" + _log_write "PHP Version: ${php_version}" + _log_write "Dnsmasq Version: ${dnsmasq_version}" + _log_write "dhcpcd Version: ${dhcpcd_version}" + _log_write "lighttpd Version: ${lighttpd_version}" + _log_write "vnStat Version: ${vnstat_version}" +} + +function _raspap_info() { + local version=$(grep "RASPI_VERSION" $install_dir/includes/defaults.php | awk -F"'" '{print $4}') + local hostapd_ini=$(cat ${RASPAP_HOSTAPD} || echo "Not present") + local provider_ini=$(cat ${RASPAP_PROVIDER} || echo "Not present") + _log_separator "RASPAP INSTALL" + _log_write "RaspAP Version: ${version}" + _log_write "RaspAP Installation Directory: ${install_dir}" + _log_write "RaspAP hostapd.ini contents:\n${hostapd_ini}" + _log_write "RaspAP provider.ini: ${provider_ini}" +} + +function _dnsmasq_info() { + local stdout=$(ls -h ${DNSMASQ_D_DIR}/090_*.conf) + local contents + _log_separator "DNSMASQ CONTENTS" + _log_write "${stdout}" + IFS= # set IFS to empty + if [ -d "${DNSMASQ_D_DIR}" ]; then + for file in "${DNSMASQ_D_DIR}"/090_*.conf; do + if [ -f "$file" ]; then + contents+="\n$file contents:\n" + contents+="$(cat $file)" + contents="${contents}$\n" + fi + done + _log_write $contents + else + _log_write "Not found: ${DNSMASQ_D_DIR}" + fi +} + +function _interface_info() { + local stdout=$(ip a) + _log_separator "INTERFACES" + _log_write "${stdout}" +} + +function _iw_reg_info() { + local stdout=$(iw reg get) + _log_separator "IW REGULATORY INFO" + _log_write "${stdout}" +} + +function _iw_dev_info() { + local stdout=$(iw dev) + _log_separator "IW DEVICE INFO" + _log_write "${stdout}" +} + +function _routing_info() { + local stdout=$(ip route) + _log_separator "ROUTING TABLE" + _log_write "${stdout}" +} + +function _systemd_info() { + local SYSTEMD_SERVICES=( + "hostapd" + "dnsmasq" + "dhcpcd" + "systemd-networkd" + "systemd-resolved" + "wg-quick@wg0" + "openvpn-client@client" + "lighttpd") + + _log_separator "SYSTEMD SERVICES" + for i in "${!SYSTEMD_SERVICES[@]}"; do + _log_write "${SYSTEMD_SERVICES[$i]} status:" + stdout=$(systemctl status "${SYSTEMD_SERVICES[$i]}" || echo "") + _log_write "${stdout}\n" + done +} + +function _output_preamble() { + _log_write "${PREAMBLE}\n" +} + +# Determines host Linux distribution details +function _get_linux_distro() { + if type lsb_release >/dev/null 2>&1; then # linuxbase.org + OS=$(lsb_release -si) + RELEASE=$(lsb_release -sr) + CODENAME=$(lsb_release -sc) + DESC=$(lsb_release -sd) + LONG_BIT=$(getconf LONG_BIT) + elif [ -f /etc/os-release ]; then # freedesktop.org + . /etc/os-release + OS=$ID + RELEASE=$VERSION_ID + CODENAME=$VERSION_CODENAME + DESC=$PRETTY_NAME + else + OS="Unsupported Linux distribution" + fi + KERNEL=$(uname -a) +} + +# Initialized log for writing +function _initialize() { + if [ -e "${logfile_path}/${RASPAP_LOGFILE}" ]; then + echo "Existing debug log found. Re-initializing..." + rm "${logfile_path}/${RASPAP_LOGFILE}" + fi + _get_linux_distro +} + +function _log_separator(){ + local separator="" + local msg="$1" + local length=${#msg} + _log_write "\n$1" + for ((i=1; i<=length; i++)); do + separator+="=" + done + _log_write $separator +} + +# Writes to logfile and stdout +function _log_write() { + echo -e "${@}" | tee -a $logfile_path/$RASPAP_LOGFILE +} + +_main "$@" From 11e17a88958ddf17f979c123aaabd1d58371f589 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 31 Oct 2023 14:40:10 +0000 Subject: [PATCH 02/17] Rename tab, add debugModal dialog --- templates/system.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/templates/system.php b/templates/system.php index cf390742..a3eb2fe6 100755 --- a/templates/system.php +++ b/templates/system.php @@ -17,7 +17,7 @@ - +
@@ -25,7 +25,7 @@ - +
@@ -88,3 +88,20 @@ + + + From 362feae185aaa33f6186c92cd567bae624637d8d Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 31 Oct 2023 15:14:55 +0000 Subject: [PATCH 03/17] Echo logfile path + file for ajax handler --- ajax/system/sys_debug.php | 10 ++++++++++ installers/debuglog.sh | 1 + templates/system/tools.php | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 ajax/system/sys_debug.php create mode 100644 templates/system/tools.php diff --git a/ajax/system/sys_debug.php b/ajax/system/sys_debug.php new file mode 100644 index 00000000..a62931fc --- /dev/null +++ b/ajax/system/sys_debug.php @@ -0,0 +1,10 @@ + diff --git a/installers/debuglog.sh b/installers/debuglog.sh index 09c82e59..ed2fe2e6 100755 --- a/installers/debuglog.sh +++ b/installers/debuglog.sh @@ -117,6 +117,7 @@ function _generate_log() { _systemd_info _log_write "RaspAP debug log generation complete." + echo "${logfile_path}/${RASPAP_LOGFILE}" exit 0 } diff --git a/templates/system/tools.php b/templates/system/tools.php new file mode 100644 index 00000000..f47be509 --- /dev/null +++ b/templates/system/tools.php @@ -0,0 +1,35 @@ + +
+

+ + + +
+
+ +
+ +
+
+
+ + +
+
+ + +
+ +
+
+
+ + + +
+ + From d619269df4b21f20aedd5c4b6d91c7aa902808b8 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 31 Oct 2023 15:17:13 +0000 Subject: [PATCH 04/17] CSRF check, exec system/debuglog.sh --- ajax/system/sys_debug.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ajax/system/sys_debug.php b/ajax/system/sys_debug.php index a62931fc..faad8fd3 100644 --- a/ajax/system/sys_debug.php +++ b/ajax/system/sys_debug.php @@ -3,8 +3,13 @@ require '../../includes/csrf.php'; require_once '../../includes/config.php'; +if (isset($_POST['csrf_token'])) { + if (csrfValidateRequest() && !CSRFValidate()) { + handleInvalidCSRFToken(); + } + exec( RASPI_CONFIG.'/system/debuglog.sh', $return); + echo json_encode(end($return)); +} else { + handleInvalidCSRFToken(); +} -$return = 0; -echo json_encode($return); - -?> From 15632a60df6a92318bbc001508b5190ff5a75e8c Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 31 Oct 2023 15:19:01 +0000 Subject: [PATCH 05/17] 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 } From 00792501fde639e03866f9ec24a81ad42606e5d6 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 31 Oct 2023 17:52:17 +0000 Subject: [PATCH 06/17] Change system > reset tab to tools --- templates/system.php | 4 ++-- templates/system/reset.php | 21 --------------------- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 templates/system/reset.php diff --git a/templates/system.php b/templates/system.php index a3eb2fe6..dff367ab 100755 --- a/templates/system.php +++ b/templates/system.php @@ -96,10 +96,10 @@ diff --git a/templates/system/reset.php b/templates/system/reset.php deleted file mode 100644 index bb598059..00000000 --- a/templates/system/reset.php +++ /dev/null @@ -1,21 +0,0 @@ - -
-

- - -
-
- - -
- -
-
-
- - -
- - From e99e98d8ca2c76529d0e9e2be1f248976c84da78 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 31 Oct 2023 20:27:56 +0000 Subject: [PATCH 07/17] Omit debug logfile write to /tmp --- installers/debuglog.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/installers/debuglog.sh b/installers/debuglog.sh index ed2fe2e6..baeb9c42 100755 --- a/installers/debuglog.sh +++ b/installers/debuglog.sh @@ -35,7 +35,6 @@ readonly DNSMASQ_D_DIR="/etc/dnsmasq.d" readonly RASPAP_DHCDPCD="/etc/dhcpcd.conf" readonly RASPAP_HOSTAPD="$RASPAP_DIR/hostapd.ini" readonly RASPAP_PROVIDER="$RASPAP_DIR/provider.ini" -readonly RASPAP_LOGFILE="raspap_debug.log" readonly RASPAP_DEBUG_VERSION="1.0" readonly PREAMBLE=" @@ -104,8 +103,6 @@ function _parse_params() { function _generate_log() { timestamp=$(date) _log_write "Debug log generation started at ${timestamp}" - _log_write "Writing log to ${logfile_path}/${RASPAP_LOGFILE}" - _system_info _packages_info _raspap_info @@ -115,9 +112,7 @@ function _generate_log() { _iw_dev_info _iw_reg_info _systemd_info - _log_write "RaspAP debug log generation complete." - echo "${logfile_path}/${RASPAP_LOGFILE}" exit 0 } @@ -202,13 +197,13 @@ function _routing_info() { _log_write "${stdout}" } +# Status of systemd services function _systemd_info() { local SYSTEMD_SERVICES=( "hostapd" "dnsmasq" "dhcpcd" "systemd-networkd" - "systemd-resolved" "wg-quick@wg0" "openvpn-client@client" "lighttpd") @@ -245,12 +240,7 @@ function _get_linux_distro() { KERNEL=$(uname -a) } -# Initialized log for writing function _initialize() { - if [ -e "${logfile_path}/${RASPAP_LOGFILE}" ]; then - echo "Existing debug log found. Re-initializing..." - rm "${logfile_path}/${RASPAP_LOGFILE}" - fi _get_linux_distro } @@ -265,9 +255,8 @@ function _log_separator(){ _log_write $separator } -# Writes to logfile and stdout function _log_write() { - echo -e "${@}" | tee -a $logfile_path/$RASPAP_LOGFILE + echo -e "${@}" } _main "$@" From 97a9cac5e8ecd19edc7ca931174e55ed26ae1464 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 31 Oct 2023 20:31:27 +0000 Subject: [PATCH 08/17] Write debug log to tempDir, redirect + download w/ readfile() --- ajax/system/sys_debug.php | 11 ++++++++++- ajax/system/sys_get_logfile.php | 21 +++++++++++++++++++++ app/js/custom.js | 11 +++++++++-- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 ajax/system/sys_get_logfile.php diff --git a/ajax/system/sys_debug.php b/ajax/system/sys_debug.php index faad8fd3..8390dafc 100644 --- a/ajax/system/sys_debug.php +++ b/ajax/system/sys_debug.php @@ -8,7 +8,16 @@ if (isset($_POST['csrf_token'])) { handleInvalidCSRFToken(); } exec( RASPI_CONFIG.'/system/debuglog.sh', $return); - echo json_encode(end($return)); + + $logOutput = implode(PHP_EOL, $return); + $filename = "raspap_debug.log"; + $tempDir = sys_get_temp_dir(); + $filePath = $tempDir . DIRECTORY_SEPARATOR . $filename; + $handle = fopen($filePath, "w"); + fwrite($handle, $logOutput); + fclose($handle); + echo json_encode($filePath); + } else { handleInvalidCSRFToken(); } diff --git a/ajax/system/sys_get_logfile.php b/ajax/system/sys_get_logfile.php new file mode 100644 index 00000000..7bcb3445 --- /dev/null +++ b/ajax/system/sys_get_logfile.php @@ -0,0 +1,21 @@ + Date: Tue, 31 Oct 2023 22:16:34 +0000 Subject: [PATCH 09/17] Update modal icon fa-sync-alt fa-spin --- templates/system.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/system.php b/templates/system.php index dff367ab..d25c3efa 100755 --- a/templates/system.php +++ b/templates/system.php @@ -93,7 +93,7 @@ - +
@@ -27,7 +29,9 @@
- + From 9663832f0de179526032b9d7133cffbe37f769c6 Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 1 Nov 2023 07:45:19 +0000 Subject: [PATCH 13/17] Add _usb_info, _wpa_info and -w --write option --- installers/debuglog.sh | 45 ++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/installers/debuglog.sh b/installers/debuglog.sh index baeb9c42..1f004832 100755 --- a/installers/debuglog.sh +++ b/installers/debuglog.sh @@ -12,7 +12,7 @@ # Usage: debuglog.sh [options] # # OPTIONS: -# -p, --path Overrides the debug logfile write path (/tmp) +# -w, --write Writes the debug log to /tmp (useful if sourced directly) # -i, --install Overrides the default RaspAP install location (/var/www/html) # # NOTE @@ -35,8 +35,9 @@ readonly DNSMASQ_D_DIR="/etc/dnsmasq.d" readonly RASPAP_DHCDPCD="/etc/dhcpcd.conf" readonly RASPAP_HOSTAPD="$RASPAP_DIR/hostapd.ini" readonly RASPAP_PROVIDER="$RASPAP_DIR/provider.ini" +readonly RASPAP_LOGPATH="/tmp" +readonly RASPAP_LOGFILE="$RASPAP_LOGPATH/raspap_debug.log" readonly RASPAP_DEBUG_VERSION="1.0" - readonly PREAMBLE=" 888888ba .d888888 888888ba 88 8b d8 88 88 8b @@ -74,14 +75,13 @@ function _main() { function _parse_params() { # default option values - logfile_path="/tmp" install_dir="/var/www/html" + writelog=0 while :; do case "${1-}" in - -p|--path) - logfile_path="$2" - shift + -w|--write) + writelog=1 ;; -i|--install) install_dir="$2" @@ -101,11 +101,12 @@ function _parse_params() { } function _generate_log() { - timestamp=$(date) - _log_write "Debug log generation started at ${timestamp}" + _log_write "Debug log generation started at $(date)" _system_info _packages_info _raspap_info + _usb_info + _wpa_info _dnsmasq_info _interface_info _routing_info @@ -116,6 +117,7 @@ function _generate_log() { exit 0 } +# Fetches hardware, OS, uptime & used memory function _system_info() { local model=$(tr -d '\0' < /proc/device-tree/model) local system_uptime=$(uptime | awk -F'( |,|:)+' '{if ($7=="min") m=$6; else {if ($7~/^day/){if ($9=="min") {d=$6;m=$8} else {d=$6;h=$8;m=$9}} else {h=$6;m=$7}}} {print d+0,"days,",h+0,"hours,",m+0,"minutes"}') @@ -128,6 +130,7 @@ function _system_info() { _log_write "Memory Usage: ${free_mem}%" } +# Outputs installed package versions function _packages_info() { local php_version=$(php -v | grep -oP "PHP \K[0-9]+\.[0-9]+.*") local dnsmasq_version=$(dnsmasq -v | grep -oP "Dnsmasq version \K[0-9]+\.[0-9]+") @@ -142,6 +145,7 @@ function _packages_info() { _log_write "vnStat Version: ${vnstat_version}" } +# Outputs installed RaspAP version & settings function _raspap_info() { local version=$(grep "RASPI_VERSION" $install_dir/includes/defaults.php | awk -F"'" '{print $4}') local hostapd_ini=$(cat ${RASPAP_HOSTAPD} || echo "Not present") @@ -153,6 +157,19 @@ function _raspap_info() { _log_write "RaspAP provider.ini: ${provider_ini}" } +function _usb_info() { + local stdout=$(lsusb) + _log_separator "USB DEVICES" + _log_write "${stdout}" +} + +function _wpa_info() { + local stdout=$(wpa_cli status) + _log_separator "WPA SUPPLICANT" + _log_write "${stdout}" +} + +# Iterates the contents of RaspAP's 090_*.conf files in dnsmasq.d function _dnsmasq_info() { local stdout=$(ls -h ${DNSMASQ_D_DIR}/090_*.conf) local contents @@ -220,7 +237,7 @@ function _output_preamble() { _log_write "${PREAMBLE}\n" } -# Determines host Linux distribution details +# Fetches host Linux distribution details function _get_linux_distro() { if type lsb_release >/dev/null 2>&1; then # linuxbase.org OS=$(lsb_release -si) @@ -241,6 +258,9 @@ function _get_linux_distro() { } function _initialize() { + if [ -e "${RASPAP_LOGFILE}" ]; then + rm "${RASPAP_LOGFILE}" + fi _get_linux_distro } @@ -256,7 +276,12 @@ function _log_separator(){ } function _log_write() { - echo -e "${@}" + if [ "${writelog}" = 1 ]; then + echo -e "${@}" | tee -a $RASPAP_LOGFILE + else + echo -e "${@}" + fi } _main "$@" + From 22cd0ae017c1390f9b09abf3ef995bff60deef0d Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 1 Nov 2023 07:46:36 +0000 Subject: [PATCH 14/17] Add system/debuglog.sh to sudoers --- ajax/system/sys_debug.php | 2 +- installers/raspap.sudoers | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ajax/system/sys_debug.php b/ajax/system/sys_debug.php index e596ea1b..bb1fed31 100644 --- a/ajax/system/sys_debug.php +++ b/ajax/system/sys_debug.php @@ -8,7 +8,7 @@ if (isset($_POST['csrf_token'])) { handleInvalidCSRFToken(); } $root = getenv("DOCUMENT_ROOT"); - exec( RASPI_CONFIG.'/system/debuglog.sh -i '.$root, $return); + exec('sudo '.RASPI_CONFIG.'/system/debuglog.sh -i '.$root, $return); $logOutput = implode(PHP_EOL, $return); $tempDir = sys_get_temp_dir(); diff --git a/installers/raspap.sudoers b/installers/raspap.sudoers index 2e97f4fc..1b5cc806 100644 --- a/installers/raspap.sudoers +++ b/installers/raspap.sudoers @@ -41,6 +41,7 @@ www-data ALL=(ALL) NOPASSWD:/etc/raspap/hostapd/servicestart.sh www-data ALL=(ALL) NOPASSWD:/etc/raspap/lighttpd/configport.sh www-data ALL=(ALL) NOPASSWD:/etc/raspap/openvpn/configauth.sh www-data ALL=(ALL) NOPASSWD:/etc/raspap/openvpn/openvpnlog.sh +www-data ALL=(ALL) NOPASSWD:/etc/raspap/system/debuglog.sh www-data ALL=(ALL) NOPASSWD:/bin/chmod o+r /tmp/hostapd.log www-data ALL=(ALL) NOPASSWD:/bin/chmod o+r /var/log/dnsmasq.log www-data ALL=(ALL) NOPASSWD:/bin/chmod o+r /tmp/wireguard.log From 5e5eb7d04fead9e592941c9300e151502e51b4ee Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 1 Nov 2023 08:53:20 +0000 Subject: [PATCH 15/17] Minor: label typo fix --- locale/en_US/LC_MESSAGES/messages.mo | Bin 37317 -> 37319 bytes locale/en_US/LC_MESSAGES/messages.po | 4 ++-- templates/system/tools.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/en_US/LC_MESSAGES/messages.mo b/locale/en_US/LC_MESSAGES/messages.mo index 3fa8bffb8ce15c61c9571a7c7060ae7977c99ac7..9bf6a3bd35b34275b8b898340a1a0f5a8d4fb647 100644 GIT binary patch delta 6428 zcmXxn3s_f08prYZ1EQh`f*^_lf+8X+<_$~4@QNtjK*AJPB`u9Y$y;g%Ez=N7ygX^H z^0>8+n(2e0WV+?9d8sv@%3aKCHx+d?TPw}lE?e#Q$ISMapP4!5%)IYAa}ILyRln1( z`c*IW_pTdb%6b|Tf-~EtreraXK2GF^6zI&Dy@k9Ke)*o-z3}F7-1e3;U%R^AIja{+Nr-@czckr9TQA z<2$H8PN4!hkIMWeM&pmDOe5~Mi44LB`dO%ir(zqN=h4sv6{v-`qbl$pOu)zoY)1E^ zG9890T_MKeeANA$FdPq}0(%dG@B%9EtEjEZ8(>URoQw*@n@J;p#$wdO&$t^lxqcPu z##+>typM5s4poV7vEi(sGW1Kg3rAsd`U%cdTuVP4+u|8aWPS558pFvz1(PeX_2HtNA& zQF|Erpv@o-{pt5Wo$g-F4AddYMlJM+8!tfxxYYHZMQ!0rs7m|+wRLZzr-+Zy&;;jE z4_-k9aMO+dfQsBd)9zg;D&wxG%zC3Hd>B>18K{L8IxA4?>_8pr!x)AC$fW+-qwg5d z`x-Eq1B79y1tU2SRAR?b0iQ)3_VcLwJ{wH^ zweXh=DB>ScC2ldq-q;qG(2vFTxD_?gTNsDOQ2|^X-a z7A(crbwL@$46_+0q893fjc^?5!F&wFnWz#M<0H7-jo(1s{}qnFdq^%OeYm}UIV$5# zr~v+m`VxAz?m`MrY2pE>ij2h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W$fo#Gk+=Y65-$F7q=TV77@vtfxk1;w-J!zds!Qb?e4CTlT(f5W!;I<}k@Y&k2ag)d+je(yB%?cajo^Qpf+ zq1G{wjyq79oN)f(Osuwl3+AJ)SE5S043+Ted>R4|}Y)w&By@hbWoQJL<>4BU_U;P?u)Km?yM%D5xybxTIwpN1VU2Q~j-R3#>$ z5-mejq|u|HOjf%anox&l59+~pQGuOCW$+#9J->oF3qf~UBT;840ku#+H(r1WaHQ*( zptkT9R3*H*G_-dQq9R^~nqU*^!B~iC8q9XqQwRNXa8UKdLtkqq1zV4_B_C+mJ zaPc8F`&$9P!(8=D&-1Pq#IGC+wS`R z#8Ue2V*t|^*#L_$h5krXKy$DME<{yyBWj%{)V%u^5m6nDBMfMParfB_rlK;hM7`(t zq8@nAjsMlT5p_nIQ5E|K>i!QsJHWEpaS!*rlExkF#(HFncnWkYfuwC zgbH*WD#OiqGj7A{FzNyOJK=B~LVqm|#?v?s(;MvHf_FI&BJ;8T586Kl16aU~({UI+ zg){Ig9EGDEvcLPSLrr`RS=(eb^0xrKjMLD+*ak8K=h5GavoUpv{flQAPNjbeqgmhN zKWtx@V$`0MqV{qoD&rc|=fPrBWu8E7#TM*@uVDrr$5gz6nkV%U_nKlT{e09G3`IR( zhV5D3%%RZ+@5f+VjM}r6s0E(KiFg2YU*b~x+ixnS)1QEGSc?j9HMYe~*a}}pE!d1L zhZMEdAE4KT#zh*%7_-cNyOm)!{Rf;)s0U7AB>sls*zQrgP(12-3iiT$+<|jY0i-Rr z0cJT1QR9=B^KqcVbPEIdI15#(XHgk6IbTIT{r%0qBs}5wU0S&|=?VHP`zI&)o@t(x zyu_b)2baV6pU_MPpUvkJ+WN1$+1F)+&!6dAIl611f2(ihimrveSDKG?{VlxtNbe)L I{7B9GKgPU71^@s6 diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index 97e27466..609b404d 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -830,8 +830,8 @@ msgstr "System tools" msgid "To generate a system debug log, click or tap the button below." msgstr "To generate a system debug log, click or tap the button below." -msgid "Debug log information contains the RaspAP version, current state and configuratin of AP related services, installed system packages, Linux kernel version and networking details. No passwords or other sensitive data are included." -msgstr "Debug log information contains the RaspAP version, current state and configuratin of AP related services, installed system packages, Linux kernel version and networking details. No passwords or other sensitive data are included." +msgid "Debug log information contains the RaspAP version, current state and configuration of AP related services, installed system packages, Linux kernel version and networking details. No passwords or other sensitive data are included." +msgstr "Debug log information contains the RaspAP version, current state and configuration of AP related services, installed system packages, Linux kernel version and networking details. No passwords or other sensitive data are included." msgid "Generate debug log" msgstr "Generate debug log" diff --git a/templates/system/tools.php b/templates/system/tools.php index 1cd67364..ff9f54f8 100644 --- a/templates/system/tools.php +++ b/templates/system/tools.php @@ -10,7 +10,7 @@ debug log, click or tap the button below."), "https://docs.raspap.com/ap-basics/#debug-log/"); ;?>
- +
From c3d97182cba16e7bb880c886b1fa6381b843b2d3 Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 1 Nov 2023 11:13:33 +0000 Subject: [PATCH 16/17] Update _initialize() w/ delete log condition, revise separator labels --- installers/debuglog.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/installers/debuglog.sh b/installers/debuglog.sh index 1f004832..5451f1fd 100755 --- a/installers/debuglog.sh +++ b/installers/debuglog.sh @@ -122,7 +122,7 @@ function _system_info() { local model=$(tr -d '\0' < /proc/device-tree/model) local system_uptime=$(uptime | awk -F'( |,|:)+' '{if ($7=="min") m=$6; else {if ($7~/^day/){if ($9=="min") {d=$6;m=$8} else {d=$6;h=$8;m=$9}} else {h=$6;m=$7}}} {print d+0,"days,",h+0,"hours,",m+0,"minutes"}') local free_mem=$(free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}') - _log_separator "SYSTEM INFO" + _log_separator "System Info" _log_write "Hardware: ${model}" _log_write "Detected OS: ${DESC} ${LONG_BIT}-bit" _log_write "Kernel: ${KERNEL}" @@ -137,7 +137,7 @@ function _packages_info() { local dhcpcd_version=$(dhcpcd --version | grep -oP '\d+\.\d+\.\d+') local lighttpd_version=$(lighttpd -v | grep -oP '(\d+\.\d+\.\d+)') local vnstat_version=$(vnstat -v | grep -oP "vnStat \K[0-9]+\.[0-9]+") - _log_separator "INSTALLED PACKAGES" + _log_separator "Installed Packaged" _log_write "PHP Version: ${php_version}" _log_write "Dnsmasq Version: ${dnsmasq_version}" _log_write "dhcpcd Version: ${dhcpcd_version}" @@ -150,7 +150,7 @@ function _raspap_info() { local version=$(grep "RASPI_VERSION" $install_dir/includes/defaults.php | awk -F"'" '{print $4}') local hostapd_ini=$(cat ${RASPAP_HOSTAPD} || echo "Not present") local provider_ini=$(cat ${RASPAP_PROVIDER} || echo "Not present") - _log_separator "RASPAP INSTALL" + _log_separator "RaspAP Install" _log_write "RaspAP Version: ${version}" _log_write "RaspAP Installation Directory: ${install_dir}" _log_write "RaspAP hostapd.ini contents:\n${hostapd_ini}" @@ -159,13 +159,13 @@ function _raspap_info() { function _usb_info() { local stdout=$(lsusb) - _log_separator "USB DEVICES" + _log_separator "USB Devices" _log_write "${stdout}" } function _wpa_info() { local stdout=$(wpa_cli status) - _log_separator "WPA SUPPLICANT" + _log_separator "WPA Supplicant" _log_write "${stdout}" } @@ -173,7 +173,7 @@ function _wpa_info() { function _dnsmasq_info() { local stdout=$(ls -h ${DNSMASQ_D_DIR}/090_*.conf) local contents - _log_separator "DNSMASQ CONTENTS" + _log_separator "Dnsmasq Contents" _log_write "${stdout}" IFS= # set IFS to empty if [ -d "${DNSMASQ_D_DIR}" ]; then @@ -192,25 +192,25 @@ function _dnsmasq_info() { function _interface_info() { local stdout=$(ip a) - _log_separator "INTERFACES" + _log_separator "Interfaces" _log_write "${stdout}" } function _iw_reg_info() { local stdout=$(iw reg get) - _log_separator "IW REGULATORY INFO" + _log_separator "IW Regulatory Info" _log_write "${stdout}" } function _iw_dev_info() { local stdout=$(iw dev) - _log_separator "IW DEVICE INFO" + _log_separator "IW Device Info" _log_write "${stdout}" } function _routing_info() { local stdout=$(ip route) - _log_separator "ROUTING TABLE" + _log_separator "Routing Info" _log_write "${stdout}" } @@ -224,8 +224,7 @@ function _systemd_info() { "wg-quick@wg0" "openvpn-client@client" "lighttpd") - - _log_separator "SYSTEMD SERVICES" + _log_separator "Systemd Services" for i in "${!SYSTEMD_SERVICES[@]}"; do _log_write "${SYSTEMD_SERVICES[$i]} status:" stdout=$(systemctl status "${SYSTEMD_SERVICES[$i]}" || echo "") @@ -258,7 +257,7 @@ function _get_linux_distro() { } function _initialize() { - if [ -e "${RASPAP_LOGFILE}" ]; then + if [ -e "${RASPAP_LOGFILE}" ] && [ "${writelog}" = 1 ]; then rm "${RASPAP_LOGFILE}" fi _get_linux_distro From 3eb8e5ae3fab9b58d757727afe5b63945f4cb0c3 Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 1 Nov 2023 20:33:15 +0000 Subject: [PATCH 17/17] Check for presence of commands, ini files and defaults.php --- installers/debuglog.sh | 52 ++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/installers/debuglog.sh b/installers/debuglog.sh index 5451f1fd..61db216d 100755 --- a/installers/debuglog.sh +++ b/installers/debuglog.sh @@ -64,7 +64,7 @@ support channels. Use one of the above links instead. DISCLAIMER: This log DOES contain details about your system, including networking settings. However, NO passwords or other sensitive data are included in the debug output. -=========================================================================================" +========================================================================================" function _main() { _parse_params "$@" @@ -130,14 +130,31 @@ function _system_info() { _log_write "Memory Usage: ${free_mem}%" } -# Outputs installed package versions +# Fetch installed package versions function _packages_info() { - local php_version=$(php -v | grep -oP "PHP \K[0-9]+\.[0-9]+.*") - local dnsmasq_version=$(dnsmasq -v | grep -oP "Dnsmasq version \K[0-9]+\.[0-9]+") - local dhcpcd_version=$(dhcpcd --version | grep -oP '\d+\.\d+\.\d+') - local lighttpd_version=$(lighttpd -v | grep -oP '(\d+\.\d+\.\d+)') - local vnstat_version=$(vnstat -v | grep -oP "vnStat \K[0-9]+\.[0-9]+") - _log_separator "Installed Packaged" + local php_version="Not present" + local dnsmasq_version="Not present" + local dhcpcd_version="Not present" + local lighttpd_version="Not present" + local vnstat_version="Not present" + + if [ -x "$(command -v php)" ]; then + php_version=$(php -v | grep -oP "PHP \K[0-9]+\.[0-9]+.*") + fi + if [ -x "$(command -v dnsmasq)" ]; then + dnsmasq_version=$(dnsmasq -v | grep -oP "Dnsmasq version \K[0-9]+\.[0-9]+") + fi + if [ -x "$(command -v dhcpcd)" ]; then + dhcpcd_version=$(dhcpcd --version | grep -oP '\d+\.\d+\.\d+') + fi + if [ -x "$(command -v dhcpcd)" ]; then + lighttpd_version=$(lighttpd -v | grep -oP '(\d+\.\d+\.\d+)') + fi + if [ -x "$(command -v dhcpcd)" ]; then + vnstat_version=$(vnstat -v | grep -oP "vnStat \K[0-9]+\.[0-9]+") + fi + + _log_separator "Installed Packages" _log_write "PHP Version: ${php_version}" _log_write "Dnsmasq Version: ${dnsmasq_version}" _log_write "dhcpcd Version: ${dhcpcd_version}" @@ -147,9 +164,20 @@ function _packages_info() { # Outputs installed RaspAP version & settings function _raspap_info() { - local version=$(grep "RASPI_VERSION" $install_dir/includes/defaults.php | awk -F"'" '{print $4}') - local hostapd_ini=$(cat ${RASPAP_HOSTAPD} || echo "Not present") - local provider_ini=$(cat ${RASPAP_PROVIDER} || echo "Not present") + local version="Not present" + local hostapd_ini="Not present" + local provider_ini="Not present" + + if [ -f ${install_dir}/includes/defaults.php ]; then + version=$(grep "RASPI_VERSION" $install_dir/includes/defaults.php | awk -F"'" '{print $4}') + fi + if [ -f ${RASPAP_HOSTAPD} ]; then + hostapd_ini=$(cat ${RASPAP_HOSTAPD}) + fi + if [ -f ${RASPAP_PROVIDER} ]; then + provider_ini=$(cat ${RASPAP_PROVIDER}) + fi + _log_separator "RaspAP Install" _log_write "RaspAP Version: ${version}" _log_write "RaspAP Installation Directory: ${install_dir}" @@ -210,7 +238,7 @@ function _iw_dev_info() { function _routing_info() { local stdout=$(ip route) - _log_separator "Routing Info" + _log_separator "Routing Table" _log_write "${stdout}" }