NetVisor: patch systemd file to fix new OIDC config (#9562)
This commit is contained in:
parent
3e2c9c997c
commit
787882db51
@ -79,6 +79,9 @@ function update_script() {
|
|||||||
-e 's| --server-port |:|' \
|
-e 's| --server-port |:|' \
|
||||||
/etc/systemd/system/netvisor-daemon.service
|
/etc/systemd/system/netvisor-daemon.service
|
||||||
sed -i '/^ \"server_target.*$/d' /root/.config/daemon/config.json
|
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
|
systemctl daemon-reload
|
||||||
|
|
||||||
msg_info "Starting services"
|
msg_info "Starting services"
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 60072,
|
"interface_port": 60072,
|
||||||
"documentation": "https://github.com/mayanayza/netvisor",
|
"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",
|
"website": "https://github.com/mayanayza/netvisor",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/netvisor.png",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/netvisor.png",
|
||||||
"description": "Automatically discover and visually document network infrastructure",
|
"description": "Automatically discover and visually document network infrastructure",
|
||||||
|
|||||||
@ -62,15 +62,9 @@ NETVISOR_INTEGRATED_DAEMON_URL=http://127.0.0.1:60073
|
|||||||
# NETVISOR_DISABLE_REGISTRATION=true
|
# NETVISOR_DISABLE_REGISTRATION=true
|
||||||
## - uncomment when using TLS
|
## - uncomment when using TLS
|
||||||
# NETVISOR_USE_SECURE_SESSION_COOKIES=true
|
# NETVISOR_USE_SECURE_SESSION_COOKIES=true
|
||||||
|
## - see https://github.com/imbolc/axum-client-ip?tab=readme-ov-file#configurable-vs-specific-extractors
|
||||||
### - OIDC (optional)
|
## - before uncommenting the below
|
||||||
# NETVISOR_OIDC_ISSUER_URL=
|
# NETVISOR_CLIENT_IP_SOURCE=
|
||||||
# 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
|
|
||||||
|
|
||||||
### - SMTP (password reset and notifications - optional)
|
### - SMTP (password reset and notifications - optional)
|
||||||
# NETVISOR_SMTP_RELAY=smtp.gmail.com:587
|
# 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_BIND_ADDRESS=0.0.0.0
|
||||||
NETVISOR_NAME="netvisor-daemon"
|
NETVISOR_NAME="netvisor-daemon"
|
||||||
NETVISOR_HEARTBEAT_INTERVAL=30
|
NETVISOR_HEARTBEAT_INTERVAL=30
|
||||||
|
|
||||||
|
### - see https://github.com/mayanayza/netvisor/blob/main/docs/CONFIGURATION.md for more options
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/netvisor-server.service
|
cat <<EOF >/etc/systemd/system/netvisor-server.service
|
||||||
@ -92,6 +88,7 @@ After=network.target postgresql.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
WorkingDirectory=/opt/netvisor/backend
|
||||||
EnvironmentFile=/opt/netvisor/.env
|
EnvironmentFile=/opt/netvisor/.env
|
||||||
ExecStart=/usr/bin/netvisor-server
|
ExecStart=/usr/bin/netvisor-server
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user