add systemd templates
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=nexus-sync client heartbeat and command runner
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/absolute/path/to/nexus-sync-client
|
||||
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Run nexus-sync client every minute
|
||||
|
||||
[Timer]
|
||||
OnBootSec=30s
|
||||
OnUnitActiveSec=1min
|
||||
AccuracySec=5s
|
||||
Persistent=true
|
||||
Unit=nexus-sync-client.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=nexus-sync server
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/absolute/path/to/nexus-sync-server
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
EnvironmentFile=-/etc/nexus-sync/server.env
|
||||
WorkingDirectory=/var/lib/nexus-sync
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user