Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template systemd service files #750

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dist/arch/nebula.service
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[Unit]
Description=nebula
Description=Nebula Mesh VPN
Wants=basic.target network-online.target
After=basic.target network.target network-online.target

[Service]
SyslogIdentifier=nebula
WorkingDirectory=/etc/nebula
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/bin/nebula -config /etc/nebula/config.yml
ExecStart=/usr/bin/nebula -config config.yml
Restart=always

[Install]
Expand Down
13 changes: 13 additions & 0 deletions dist/arch/nebula@.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Nebula Mesh VPN for %I
Wants=basic.target network-online.target
After=basic.target network.target network-online.target

[Service]
WorkingDirectory=/etc/nebula/%i
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/bin/nebula -config config.yml
Restart=always

[Install]
WantedBy=multi-user.target
4 changes: 2 additions & 2 deletions dist/fedora/nebula.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Before=sshd.service
Wants=basic.target network-online.target

[Service]
WorkingDirectory=/etc/nebula
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/bin/nebula -config /etc/nebula/config.yml
ExecStart=/usr/bin/nebula -config config.yml
Restart=always
SyslogIdentifier=nebula

[Install]
WantedBy=multi-user.target
15 changes: 15 additions & 0 deletions dist/fedora/nebula@.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=Nebula overlay networking tool, for %I

After=basic.target network.target network-online.target
Before=sshd.service
Wants=basic.target network-online.target

[Service]
WorkingDirectory=/etc/nebula/%i
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/bin/nebula -config config.yml
Restart=always

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Wants=basic.target
After=basic.target network.target

[Service]
SyslogIdentifier=nebula
WorkingDirectory=/etc/nebula
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/nebula -config /etc/nebula/config.yml
ExecStart=/usr/local/bin/nebula -config config.yml
Restart=always

[Install]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Nebula Mesh VPN for %I
Wants=basic.target
After=basic.target network.target

[Service]
WorkingDirectory=/etc/nebula/%i
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/nebula -config config.yml
Restart=always

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
register: addconf
notify: restart nebula

- name: nebula systemd (template)
copy: src=systemd.nebula@.service dest="/etc/systemd/system/nebula@.service" mode=0644 owner=root group=root
register: addconf

- name: maybe reload systemd
shell: systemctl daemon-reload
when: addconf.changed
Expand Down
6 changes: 3 additions & 3 deletions examples/service_scripts/nebula.service
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[Unit]
Description=nebula
Description=Nebula Mesh VPN
Wants=basic.target
After=basic.target network.target
Before=sshd.service

[Service]
SyslogIdentifier=nebula
WorkingDirectory=/etc/nebula
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/nebula -config /etc/nebula/config.yml
ExecStart=/usr/local/bin/nebula -config config.yml
Restart=always

[Install]
Expand Down
14 changes: 14 additions & 0 deletions examples/service_scripts/nebula@.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Nebula Mesh VPN for %I
Wants=basic.target
After=basic.target network.target
Before=sshd.service

[Service]
WorkingDirectory=/etc/nebula/%i
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/nebula -config config.yml
Restart=always

[Install]
WantedBy=multi-user.target