Skip to content

Commit d7e77e2

Browse files
'Add new script' (#7974)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
1 parent b850d3f commit d7e77e2

File tree

4 files changed

+150
-0
lines changed

4 files changed

+150
-0
lines changed

ct/headers/myip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__ ___ ________
2+
/ |/ /_ __/ _/ __ \
3+
/ /|_/ / / / // // /_/ /
4+
/ / / / /_/ // // ____/
5+
/_/ /_/\__, /___/_/
6+
/____/

ct/myip.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://ipcheck.ing/
7+
8+
APP="MyIP"
9+
var_tags="${var_tags:-network}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-512}"
12+
var_disk="${var_disk:-4}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /opt/myip ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
31+
if check_for_gh_release "myip" "jason5ng32/MyIP"; then
32+
msg_info "Stopping Services"
33+
systemctl stop myip
34+
msg_ok "Stopped Services"
35+
36+
cp /opt/myip/.env /opt
37+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "myip" "jason5ng32/MyIP" "tarball"
38+
mv /opt/.env /opt/myip
39+
40+
msg_info "Starting Services"
41+
systemctl start myip
42+
msg_ok "Started Services"
43+
msg_ok "Updated Successfully"
44+
fi
45+
exit
46+
}
47+
48+
start
49+
build_container
50+
description
51+
52+
msg_ok "Completed Successfully!\n"
53+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
54+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
55+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:18966${CL}"

frontend/public/json/myip.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "MyIP",
3+
"slug": "myip",
4+
"categories": [
5+
4
6+
],
7+
"date_created": "2025-07-02",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"config_path": "/opt/myip/.env",
12+
"interface_port": 18966,
13+
"documentation": "https://github.com/jason5ng32/MyIP#-environment-variable",
14+
"website": "https://ipcheck.ing/",
15+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/myip.webp",
16+
"description": "The best IP Toolbox. Easy to check what's your IPs, IP geolocation, check for DNS leaks, examine WebRTC connections, speed test, ping test, MTR test, check website availability, whois search and more!",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/myip.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 512,
24+
"hdd": 2,
25+
"os": "Debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": []
35+
}

install/myip-install.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://ipcheck.ing/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
NODE_VERSION="22" setup_nodejs
17+
fetch_and_deploy_gh_release "myip" "jason5ng32/MyIP" "tarball"
18+
19+
msg_info "Configuring MyIP"
20+
cd /opt/myip
21+
cp .env.example .env
22+
$STD npm install
23+
$STD npm run build
24+
msg_ok "Configured MyIP"
25+
26+
msg_info "Creating Service"
27+
cat <<EOF >/etc/systemd/system/myip.service
28+
[Unit]
29+
Description=MyIP Service
30+
After=network.target
31+
32+
[Service]
33+
Type=simple
34+
User=root
35+
WorkingDirectory=/opt/myip
36+
ExecStart=/usr/bin/npm start
37+
EnvironmentFile=/opt/myip/.env
38+
Restart=on-failure
39+
RestartSec=5
40+
41+
[Install]
42+
WantedBy=multi-user.target
43+
EOF
44+
systemctl enable -q --now myip
45+
msg_ok "Service created"
46+
47+
motd_ssh
48+
customize
49+
50+
msg_info "Cleaning up"
51+
$STD apt -y autoremove
52+
$STD apt -y autoclean
53+
$STD apt -y clean
54+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)