Last active
July 28, 2023 20:17
-
-
Save gboddin/abd0cdc704bc7126b17d19f849086d08 to your computer and use it in GitHub Desktop.
Nebula systemd multinet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a mostly empty service, but allows commands like stop, start, reload | |
# to propagate to all nebula@ service instances. | |
[Unit] | |
Description=Nebula VPN | |
Documentation=info:nebula | |
After=network.target | |
Wants=network.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/bin/true | |
ExecReload=/bin/true | |
WorkingDirectory=/etc/nebula | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Nebula net %i | |
Documentation=info:nebula | |
PartOf=nebula.service | |
ReloadPropagatedFrom=nebula.service | |
After=network.target | |
Wants=network.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/etc/nebula/%i | |
ExecStart=/usr/local/bin/nebula -config /etc/nebula/%i/config.yaml | |
ExecReload=/bin/kill -HUP $MAINPID | |
KillMode=mixed | |
Restart=on-failure | |
RestartSec=5 | |
TimeoutStopSec=5 | |
[Install] | |
WantedBy=nebula.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation
nebula.service
and[email protected]
in/etc/systemd/system
/etc/nebula
, eg/etc/nebula/net0
/etc/nebula/net0
systemctl enable nebula
systemctl enable nebula@net0
to run at bootsystemctl start nebula@net0
to start the network