]> git.hoellein.online Git - homeserver/commitdiff
autossh vserver funktioniert
authormhoellein <mhoellein@freenet.de>
Thu, 13 Dec 2018 12:50:31 +0000 (13:50 +0100)
committermhoellein <mhoellein@freenet.de>
Thu, 13 Dec 2018 12:50:31 +0000 (13:50 +0100)
.etckeeper
cups/printers.conf
cups/printers.conf.O
default/autossh [new file with mode: 0644]
passwd
systemd/system/autossh.service

index b55eda9b8edf85fd025edd7008526158a14c0e28..c2eccb7851c6f5b2da4eff5d0f67facd527febd2 100755 (executable)
@@ -2126,6 +2126,7 @@ maybe chmod 0644 'default/apache-htcacheclean'
 maybe chmod 0644 'default/apcupsd'
 maybe chmod 0644 'default/arpwatch'
 maybe chmod 0644 'default/asterisk'
+maybe chmod 0644 'default/autossh'
 maybe chmod 0644 'default/avahi-daemon'
 maybe chmod 0644 'default/batmand'
 maybe chmod 0644 'default/bind9'
index 638c4b2ca013e3d921d8418662cc72a64e5724df..83707699dca8be7b67cbaae9a3ed7f7e50f1220e 100644 (file)
@@ -20,14 +20,14 @@ OpPolicy default
 ErrorPolicy retry-job
 </Printer>
 <Printer HP_Color_LaserJet_MFP_M277dw_9D0E59_@NPI9D0E59.local>
-UUID urn:uuid:7b0aa7bf-b984-39e9-722c-6b689f5387e2
+UUID urn:uuid:fa3b232e-0bde-3b04-61fe-187a3d4d5413
 Info 
 Location 
 MakeModel HP Color LaserJet MFP M277dw, driverless, cups-filters 1.20.2
 DeviceURI ipps://NPI9D0E59.local:443/ipp/print
 State Idle
-StateTime 1544608051
-ConfigTime 1544608051
+StateTime 1544702856
+ConfigTime 1544702856
 Type 8425564
 Accepting Yes
 Shared No
index 3c0a99fae83a8a54157a45e1c25dc895ead3f8a9..978afab14a17f520878548946d43946269f1f1f6 100644 (file)
@@ -19,3 +19,23 @@ KLimit 0
 OpPolicy default
 ErrorPolicy retry-job
 </Printer>
+<Printer HP_Color_LaserJet_MFP_M277dw_9D0E59_@NPI9D0E59.local>
+UUID urn:uuid:aa605245-41f4-3b6f-4bac-c70bafd338c5
+Info 
+Location 
+MakeModel HP Color LaserJet MFP M277dw, driverless, cups-filters 1.20.2
+DeviceURI ipps://NPI9D0E59.local:443/ipp/print
+State Idle
+StateTime 1544691923
+ConfigTime 1544691923
+Type 8425564
+Accepting Yes
+Shared No
+JobSheets none none
+QuotaPeriod 0
+PageLimit 0
+KLimit 0
+OpPolicy default
+ErrorPolicy retry-job
+Option cups-browsed true
+</Printer>
diff --git a/default/autossh b/default/autossh
new file mode 100644 (file)
index 0000000..8e6dac7
--- /dev/null
@@ -0,0 +1,5 @@
+AUTOSSH_POLL=60
+AUTOSSH_FIRST_POLL=30
+AUTOSSH_GATETIME=0
+AUTOSSH_PORT=22000
+SSH_OPTIONS="-N -R 12345:localhost:22 root@hoellein.online -i /var/lib/autossh/.ssh/root@hoellein.online"
diff --git a/passwd b/passwd
index d71abaac35f392bf83d052425d27cc792429d757..9ce643015fb1d69ef8c91854c0ef9770540535a0 100644 (file)
--- a/passwd
+++ b/passwd
@@ -75,4 +75,4 @@ Debian-snmp:x:145:121::/var/lib/snmp:/bin/false
 geoclue:x:148:155::/var/lib/geoclue:/usr/sbin/nologin
 lool:x:149:156::/opt/lool:/usr/sbin/nologin
 serverbackup:x:5003:5003::/home/serverbackup:/bin/bash
-autossh:x:5004:5004:ssh tunnel user:/home/autossh:/bin/sh
+autossh:x:5004:5004:ssh tunnel user:/var/lib/autossh:/bin/sh
index 4eac245a2b4536777f233ff046491bc52969c4a5..44c4d39569be503c8f11003e5b0702ba41cc36a1 100644 (file)
@@ -1,17 +1,24 @@
 [Unit]
-Description=Keeps a tunnel to 'remote.example.com' open
+Description=Keeps a tunnel to 'hoellein.online' open (only IPv4)
 After=network.target ssh.service
 
 [Service]
 User=autossh
+Type=simple
+EnvironmentFile=/etc/default/autossh
 # -p [PORT]
 # -l [user]
 # -M 0 --> no monitoring
 # -N Just open the connection and do nothing (not interactive)
 # LOCALPORT:IP_ON_EXAMPLE_COM:PORT_ON_EXAMPLE_COM
-ExecStart=/usr/bin/autossh -M 20000 -f -i /root/.ssh/root@hoellein.online -N -T -R12345:localhost:22 root@hoellein.online
-ExecStop=/usr/bin/killall -s KILL autossh
-RestartSec=5
+#ExecStart=/usr/bin/autossh -M 20000 -f -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -N -T -R12345:localhost:22 -4 -i /var/lib/autossh/.ssh/root@hoellein.online hoellein.online
+ExecStart=/usr/bin/autossh $SSH_OPTIONS
+Restart=always
+#ExecStop=/usr/bin/killall -s KILL autossh
+RestartSec=60
+#Environment=AUTOSSH_GATETIME=0
+#Environment=AUTOSSH_DEBUG=7
+#Environment=AUTOSSH_LOGFILE=/var/lib/autossh/autossh.log
 
 [Install]
 WantedBy=multi-user.target