Created
January 9, 2018 18:57
-
-
Save jayliew/880d2948d7e0382580e471b44f4bc34f to your computer and use it in GitHub Desktop.
Ubuntu 16.04 systemd service starter script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=SSH Tunnel for MySQL | |
After=network.target | |
[Service] | |
Restart=always | |
RestartSec=20 | |
User=unprivilegedusername | |
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=60 -L 3306:127.0.0.1:3306 username@hostactuallyrunningmysqld | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment