From 4ff8bad349ec587b5cfd7747049c57eb7aee5372 Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Thu, 11 Apr 2019 12:42:22 +0200 Subject: [PATCH] systemd file --- README.md | 6 ++++++ autossh-hugvey.service | 10 ++++++++++ 2 files changed, 16 insertions(+) create mode 100644 autossh-hugvey.service diff --git a/README.md b/README.md index a79f4c1..96f2a3b 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,12 @@ git sumodule update ``` +copy autossh-hugvey.service to `/etc/systemd/system/`: + +```bash +cp autossh-hugvey.service /etc/systemd/system/autossh-hugvey.service +``` + ### clients ``` diff --git a/autossh-hugvey.service b/autossh-hugvey.service new file mode 100644 index 0000000..6f90adb --- /dev/null +++ b/autossh-hugvey.service @@ -0,0 +1,10 @@ +[Unit] +Description=AutoSSH tunnel to hugvey user on rubenvandeven.com port 6666 +After=network.target + +[Service] +Environment="AUTOSSH_GATETIME=0" +ExecStart=/usr/bin/autossh -M 0 -N -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R 6666:localhost:22 hugvey@rubenvandeven.com + +[Install] +WantedBy=multi-user.target