IP-Tag: Optimizations / Guide / Manual Execution (#5791)
* IP-Tag: Optimizations / Guide / Manual Execution * warning > info * Update add-iptag.json
This commit is contained in:
parent
9ddf10f82e
commit
d59aa0527a
6
frontend/public/json/add-iptag.json
generated
6
frontend/public/json/add-iptag.json
generated
@ -37,12 +37,16 @@
|
|||||||
"type": "info"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Configuration: `nano /opt/iptag/iptag.conf`. iptag.service must be restarted after change.",
|
"text": "Configuration: `nano /opt/iptag/iptag.conf`. iptag Service must be restarted after change. See here for full documentation: `https://github.com/community-scripts/ProxmoxVE/discussions/5790`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "The Proxmox Node must contain ipcalc and net-tools. `apt-get install -y ipcalc net-tools`",
|
"text": "The Proxmox Node must contain ipcalc and net-tools. `apt-get install -y ipcalc net-tools`",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "You can execute the ip tool manually with `iptag-run`",
|
||||||
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -194,16 +194,16 @@ LXC_STATUS_CHECK_INTERVAL=300
|
|||||||
FORCE_UPDATE_INTERVAL=7200
|
FORCE_UPDATE_INTERVAL=7200
|
||||||
|
|
||||||
# Performance optimizations
|
# Performance optimizations
|
||||||
VM_IP_CACHE_TTL=120
|
VM_IP_CACHE_TTL=300
|
||||||
MAX_PARALLEL_VM_CHECKS=5
|
MAX_PARALLEL_VM_CHECKS=2
|
||||||
|
|
||||||
# LXC performance optimizations
|
# LXC performance optimizations
|
||||||
LXC_IP_CACHE_TTL=0
|
LXC_IP_CACHE_TTL=300
|
||||||
MAX_PARALLEL_LXC_CHECKS=7
|
MAX_PARALLEL_LXC_CHECKS=2
|
||||||
|
|
||||||
# Extreme LXC optimizations
|
# Extreme LXC optimizations
|
||||||
LXC_BATCH_SIZE=20
|
LXC_BATCH_SIZE=3
|
||||||
LXC_STATUS_CACHE_TTL=30
|
LXC_STATUS_CACHE_TTL=300
|
||||||
LXC_AGGRESSIVE_CACHING=true
|
LXC_AGGRESSIVE_CACHING=true
|
||||||
LXC_SKIP_SLOW_METHODS=true
|
LXC_SKIP_SLOW_METHODS=true
|
||||||
|
|
||||||
@ -222,8 +222,8 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/opt/iptag/iptag
|
ExecStart=/opt/iptag/iptag
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
RestartSec=1
|
RestartSec=10
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
@ -872,7 +872,11 @@ main() {
|
|||||||
echo -e "${BLUE}ℹ${NC} Tag format: ${WHITE}${TAG_FORMAT:-$DEFAULT_TAG_FORMAT}${NC}"
|
echo -e "${BLUE}ℹ${NC} Tag format: ${WHITE}${TAG_FORMAT:-$DEFAULT_TAG_FORMAT}${NC}"
|
||||||
echo -e "${BLUE}ℹ${NC} Allowed CIDRs: ${WHITE}${CIDR_LIST[*]}${NC}"
|
echo -e "${BLUE}ℹ${NC} Allowed CIDRs: ${WHITE}${CIDR_LIST[*]}${NC}"
|
||||||
echo -e "${PURPLE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}\n"
|
echo -e "${PURPLE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}\n"
|
||||||
check
|
|
||||||
|
while true; do
|
||||||
|
check
|
||||||
|
sleep "${LOOP_INTERVAL:-300}"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Cache cleanup function
|
# Cache cleanup function
|
||||||
@ -1310,6 +1314,21 @@ msg_info "Restarting Service with optimizations"
|
|||||||
systemctl restart iptag.service &>/dev/null
|
systemctl restart iptag.service &>/dev/null
|
||||||
msg_ok "Service restarted with CPU optimizations"
|
msg_ok "Service restarted with CPU optimizations"
|
||||||
|
|
||||||
|
msg_info "Creating manual run command"
|
||||||
|
cat <<'EOF' >/usr/local/bin/iptag-run
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
CONFIG_FILE="/opt/iptag/iptag.conf"
|
||||||
|
SCRIPT_FILE="/opt/iptag/iptag"
|
||||||
|
if [[ ! -f "$SCRIPT_FILE" ]]; then
|
||||||
|
echo "❌ Main script not found: $SCRIPT_FILE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
export FORCE_SINGLE_RUN=true
|
||||||
|
exec "$SCRIPT_FILE"
|
||||||
|
EOF
|
||||||
|
chmod +x /usr/local/bin/iptag-run
|
||||||
|
msg_ok "Created iptag-run executable - You can execute this manually by entering “iptag-run” in the Proxmox host, so the script is executed by hand."
|
||||||
|
|
||||||
SPINNER_PID=""
|
SPINNER_PID=""
|
||||||
echo -e "\n${APP} installation completed successfully! ${CL}\n"
|
echo -e "\n${APP} installation completed successfully! ${CL}\n"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user