From 0caef43c402f3f7aecb9c94ada2b080c308dce7d Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sun, 29 Sep 2024 16:44:00 -0600 Subject: [PATCH] Update uptime-kuma-install.sh - minor edits --- uptime-kuma/uptime-kuma-install.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/uptime-kuma/uptime-kuma-install.sh b/uptime-kuma/uptime-kuma-install.sh index e10cb18..874f40a 100644 --- a/uptime-kuma/uptime-kuma-install.sh +++ b/uptime-kuma/uptime-kuma-install.sh @@ -1,24 +1,24 @@ #!/bin/sh # Install Uptime-Kuma -# Check for root privileges +# Check for Root Privileges if ! [ $(id -u) = 0 ]; then echo "This script must be run with root privileges" exit 1 fi -NODE_VERSION="18" DATA_PATH="/mnt/data" +NODE_VERSION="18" -# Install packages +# Install Packages pkg install -y git-lite npm-node"${NODE_VERSION}" -# Create directories +# Create Directories mkdir -p "${DATA_PATH}" mkdir -p /usr/local/etc/rc.d mkdir -p /var/run/uptimekuma -# Install Uptime-Kuma +# Uptime-Kuma Setup pw user add uptimekuma -c uptimekuma -u 3001 -d /nonexistent -s /usr/bin/nologin npm install npm -g cd /usr/local/ && git clone https://github.com/louislam/uptime-kuma.git @@ -26,17 +26,16 @@ cd /usr/local/uptime-kuma && npm run setup sed -i '' "s|console.log(\"Welcome to Uptime Kuma\");|process.chdir('/usr/local/uptime-kuma');\n&|" /usr/local/uptime-kuma/server/server.js fetch -o /usr/local/etc/rc.d/ https://raw.githubusercontent.com/tschettervictor/bsd-apps/main/uptime-kuma/includes/uptimekuma chmod +x /usr/local/etc/rc.d/uptimekuma - -# Change directory ownership chown -R uptimekuma:uptimekuma /var/run/uptimekuma chown -R uptimekuma:uptimekuma /usr/local/uptime-kuma chown -R uptimekuma:uptimekuma "${DATA_PATH}" -# Enable and start services +# Enable and Start Services sysrc uptimekuma_enable="YES" sysrc uptimekuma_datadir="${DATA_PATH}" service uptimekuma start +# Done echo "---------------" echo "Installation Complete!" echo "Uptime-Kuma is running on port 3001"