Difference between revisions of "Linux: Setting up a call home function"

From Define Wiki
Jump to navigation Jump to search
(Created page with "File: /etc/systemd/system/callhome.service # Mode 644. <syntaxhighlight> [Unit]� Description=callhome �Documentation=man:ssh �After=network-online.target �� [Service]� Type=...")
 
Line 2: Line 2:
  
 
<syntaxhighlight>
 
<syntaxhighlight>
[Unit]
+
[Unit]
 
Description=callhome
 
Description=callhome
�Documentation=man:ssh
+
Documentation=man:ssh
�After=network-online.target
+
After=network-online.target
��
+
 
[Service]
+
[Service]
 
Type=idle
 
Type=idle
�ExecStart=/usr/bin/ssh -o “ServerAliveInterval 30” -o “ServerAliveCountMax 3” -o “ExitOnForwardFailure=yes” -N -R 8098:localhost:22 rsupport@head.bostonhpc.co.uk�
+
ExecStart=/usr/bin/ssh -o “ServerAliveInterval 30” -o “ServerAliveCountMax 3” -o “ExitOnForwardFailure=yes” -N -R 8098:localhost:22 rsupport@head.bostonhpc.co.uk
 
ExecReload=/bin/kill -HUP $MAINPID
 
ExecReload=/bin/kill -HUP $MAINPID
�KillMode=process�
+
KillMode=process
 
Restart=on-failure
 
Restart=on-failure
�RestartSec=57s�
+
RestartSec=57s
  
[Install]
+
[Install]
 
WantedBy=multi-user.target
 
WantedBy=multi-user.target

Revision as of 11:29, 16 July 2020

File: /etc/systemd/system/callhome.service # Mode 644.

<syntaxhighlight> [Unit] Description=callhome Documentation=man:ssh After=network-online.target

[Service] Type=idle ExecStart=/usr/bin/ssh -o “ServerAliveInterval 30” -o “ServerAliveCountMax 3” -o “ExitOnForwardFailure=yes” -N -R 8098:localhost:22 rsupport@head.bostonhpc.co.uk ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure RestartSec=57s

[Install] WantedBy=multi-user.target