]> git.rmz.io Git - dotfiles.git/commitdiff
systemd: user timer to keep backdoor alive
authorSamir Benmendil <samir.benmendil@ultrahaptics.com>
Mon, 29 Jul 2019 10:32:10 +0000 (11:32 +0100)
committerSamir Benmendil <samir.benmendil@ultrahaptics.com>
Mon, 29 Jul 2019 10:32:10 +0000 (11:32 +0100)
systemd/user/backdoor@.service
systemd/user/backdoor@.timer [new file with mode: 0644]

index 087f9ccb26a9be26640132a3813fcea98af560ec..b1207dd4d446dd9a5b5e10345e824245312a667b 100644 (file)
@@ -1,13 +1,9 @@
 [Unit]
 Description=Reverse SSH Tunnel Service
 After=network.target
-StartLimitIntervalSec=30m
-StartLimitBurst=5
 
 [Service]
 ExecStart=/usr/bin/ssh -i ~/.ssh/id_ed25519_port-forward -NT -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -R 22222:localhost:22 %i
-Restart=always
-RestartSec=5m
 
 [Install]
 WantedBy=default.target
diff --git a/systemd/user/backdoor@.timer b/systemd/user/backdoor@.timer
new file mode 100644 (file)
index 0000000..2e39009
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Reverse SSH Tunnel Timer
+
+[Timer]
+# Start after boot
+OnBootSec=5min
+# If unit becomes inactive, try again later
+OnUnitInactiveSec=10min