add systemd templates

This commit is contained in:
2026-06-24 18:52:56 +03:00
parent 7ebfea097d
commit b41d8023b6
7 changed files with 101 additions and 0 deletions
@@ -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
+12
View File
@@ -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