s
This commit is contained in:
@@ -777,6 +777,36 @@ UNIT
|
||||
systemctl enable --now live-console.service
|
||||
}
|
||||
|
||||
install_neko_ip_watch_service() {
|
||||
if [ "${ENABLE_NEKO:-1}" != "1" ]; then
|
||||
systemctl disable --now live-neko-ip-watch.service >/dev/null 2>&1 || true
|
||||
rm -f /etc/systemd/system/live-neko-ip-watch.service
|
||||
systemctl daemon-reload
|
||||
return 0
|
||||
fi
|
||||
log "Installing Neko LAN IP watcher"
|
||||
chmod +x "$ROOT_DIR/scripts/linux/neko_ip_watch.sh"
|
||||
cat >/etc/systemd/system/live-neko-ip-watch.service <<UNIT
|
||||
[Unit]
|
||||
Description=Live Neko LAN IP watcher
|
||||
After=network-online.target docker.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=$ROOT_DIR
|
||||
Environment=NEKO_IP_WATCH_INTERVAL=${NEKO_IP_WATCH_INTERVAL:-15}
|
||||
ExecStart=/bin/bash $ROOT_DIR/scripts/linux/neko_ip_watch.sh
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
UNIT
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now live-neko-ip-watch.service
|
||||
}
|
||||
|
||||
configure_sudoers() {
|
||||
log "Configuring sudoers for live control plane"
|
||||
cat >/etc/sudoers.d/live-control-plane <<SUDOERS
|
||||
|
||||
Reference in New Issue
Block a user