mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-13 07:10:51 +02:00
Refactor (#6902)
This commit is contained in:
@@ -13,22 +13,18 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y git
|
||||
$STD apt-get install -y ca-certificates
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
fetch_and_deploy_gh_release "uptime-kuma" "louislam/uptime-kuma" "tarball"
|
||||
|
||||
msg_info "Installing Uptime Kuma"
|
||||
$STD git clone https://github.com/louislam/uptime-kuma.git
|
||||
cd /opt/uptime-kuma
|
||||
$STD npm run setup
|
||||
$STD npm ci --omit dev
|
||||
$STD npm run download-dist
|
||||
msg_ok "Installed Uptime Kuma"
|
||||
|
||||
msg_info "Creating Service"
|
||||
service_path="/etc/systemd/system/uptime-kuma.service"
|
||||
echo "[Unit]
|
||||
cat <<EOF >/etc/systemd/system/uptime-kuma.service
|
||||
[Unit]
|
||||
Description=uptime-kuma
|
||||
|
||||
[Service]
|
||||
@@ -39,8 +35,9 @@ WorkingDirectory=/opt/uptime-kuma
|
||||
ExecStart=/usr/bin/npm start
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target" >$service_path
|
||||
$STD systemctl enable --now uptime-kuma
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now uptime-kuma
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
|
||||
Reference in New Issue
Block a user