Advertisement
mbazs

systemd - autossh

Aug 9th, 2016
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [Unit]
  2. Description=MB Remote Control
  3. After=network.target
  4.  
  5. [Service]
  6. ExecStart=/usr/bin/autossh -N -q -R0.0.0.0:39202:localhost:22 cokmok
  7. ExecReload=/bin/kill -HUP $MAINPID
  8. KillMode=process
  9. Restart=on-failure
  10. TimeoutStartSec=30s
  11.  
  12. [Install]
  13. WantedBy=multi-user.target
  14.  
  15. - Természetesen ez megvolt:
  16. # systemctl enable mb_remote.service
  17.  
  18. - Reboot után:
  19. # systemctl status mb_remote.service
  20. ● mb_remote.service - MB Remote Control
  21.    Loaded: loaded (/etc/systemd/system/mb_remote.service; enabled)
  22.    Active: inactive (dead) since k 2016-08-09 21:43:55 CEST; 21min ago
  23.   Process: 580 ExecStart=/usr/bin/autossh -N -q -R0.0.0.0:39202:localhost:22 cokmok (code=exited, status=0/SUCCESS)
  24.  Main PID: 580 (code=exited, status=0/SUCCESS)
  25.  
  26. aug 09 21:43:54 paksikati autossh[580]: starting ssh (count 1)
  27. aug 09 21:43:54 paksikati autossh[580]: ssh child pid is 679
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement