mirror of
https://github.com/tschettervictor/bsd-apps.git
synced 2025-12-11 01:19:56 +01:00
uptime-kuma: Add ability to select version
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# Install Uptime-Kuma
|
||||
|
||||
APP_NAME="Uptime-Kuma"
|
||||
APP_VERSION="latest"
|
||||
DATA_PATH="/mnt/data"
|
||||
NODE_VERSION="18"
|
||||
|
||||
@@ -25,7 +26,11 @@ mkdir -p /var/run/uptimekuma
|
||||
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
|
||||
cd /usr/local/uptime-kuma && npm run setup
|
||||
if [ "{APP_VERSION}" = "latest" ]; then
|
||||
cd /usr/local/uptime-kuma && npm run setup
|
||||
else
|
||||
git checkout "${APP_VERSION}" && npm ci --production && npm run download-dist
|
||||
fi
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user