NetVisor: patch systemd file to fix new OIDC config (#9562)

This commit is contained in:
Chris 2025-12-02 06:03:55 -05:00 committed by GitHub
parent 3e2c9c997c
commit 787882db51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 10 deletions

View File

@ -79,6 +79,9 @@ function update_script() {
-e 's| --server-port |:|' \
/etc/systemd/system/netvisor-daemon.service
sed -i '/^ \"server_target.*$/d' /root/.config/daemon/config.json
if ! grep -q "WorkingD" /etc/systemd/system/netvisor-server.service; then
sed -i '\|simple$|a\WorkingDirectory=/opt/netvisor/backend' /etc/systemd/system/netvisor-server.service
fi
systemctl daemon-reload
msg_info "Starting services"

View File

@ -10,7 +10,7 @@
"privileged": false,
"interface_port": 60072,
"documentation": "https://github.com/mayanayza/netvisor",
"config_path": "/opt/netvisor/.env",
"config_path": "/opt/netvisor/.env, OIDC: /opt/netvisor/oidc.toml",
"website": "https://github.com/mayanayza/netvisor",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/netvisor.png",
"description": "Automatically discover and visually document network infrastructure",

View File

@ -62,15 +62,9 @@ NETVISOR_INTEGRATED_DAEMON_URL=http://127.0.0.1:60073
# NETVISOR_DISABLE_REGISTRATION=true
## - uncomment when using TLS
# NETVISOR_USE_SECURE_SESSION_COOKIES=true
### - OIDC (optional)
# NETVISOR_OIDC_ISSUER_URL=
# NETVISOR_OIDC_CLIENT_ID=
# NETVISOR_OIDC_CLIENT_SECRET=
# NETVISOR_OIDC_PROVIDER_NAME=
# NETVISOR_OIDC_REDIRECT_URL=
## - Callback URL for reference
# http://your-netvisor-domain:60072/api/auth/oidc/callback
## - see https://github.com/imbolc/axum-client-ip?tab=readme-ov-file#configurable-vs-specific-extractors
## - before uncommenting the below
# NETVISOR_CLIENT_IP_SOURCE=
### - SMTP (password reset and notifications - optional)
# NETVISOR_SMTP_RELAY=smtp.gmail.com:587
@ -83,6 +77,8 @@ NETVISOR_SERVER_URL=http://127.0.0.1:60072
NETVISOR_BIND_ADDRESS=0.0.0.0
NETVISOR_NAME="netvisor-daemon"
NETVISOR_HEARTBEAT_INTERVAL=30
### - see https://github.com/mayanayza/netvisor/blob/main/docs/CONFIGURATION.md for more options
EOF
cat <<EOF >/etc/systemd/system/netvisor-server.service
@ -92,6 +88,7 @@ After=network.target postgresql.service
[Service]
Type=simple
WorkingDirectory=/opt/netvisor/backend
EnvironmentFile=/opt/netvisor/.env
ExecStart=/usr/bin/netvisor-server
Restart=always