mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-28 17:48:34 +01:00
* myip: bump Node.js from 24 to 26 * Increase default RAM allocation from 1024MB to 2048MB --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
50 lines
1011 B
Bash
50 lines
1011 B
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
|
# Author: Slaviša Arežina (tremor021)
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://ipcheck.ing/ | Github: https://github.com/jason5ng32/MyIP
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
color
|
|
verb_ip6
|
|
catch_errors
|
|
setting_up_container
|
|
network_check
|
|
update_os
|
|
|
|
NODE_VERSION="26" setup_nodejs
|
|
fetch_and_deploy_gh_release "myip" "jason5ng32/MyIP" "tarball"
|
|
|
|
msg_info "Configuring MyIP"
|
|
cd /opt/myip
|
|
cp .env.example .env
|
|
$STD npm install
|
|
$STD npm run build
|
|
msg_ok "Configured MyIP"
|
|
|
|
msg_info "Creating Service"
|
|
cat <<EOF >/etc/systemd/system/myip.service
|
|
[Unit]
|
|
Description=MyIP Service
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=root
|
|
WorkingDirectory=/opt/myip
|
|
ExecStart=/usr/bin/npm start
|
|
EnvironmentFile=/opt/myip/.env
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
systemctl enable -q --now myip
|
|
msg_ok "Service created"
|
|
|
|
motd_ssh
|
|
customize
|
|
cleanup_lxc
|