Last active
April 22, 2018 07:59
-
-
Save ArrEssJay/d8cb0c87400a4aab59772138eca4d026 to your computer and use it in GitHub Desktop.
ngrok / ngrok2 systemd script + config
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
# /lib/systemd/system/ngrok.service.d/env.conf | |
[Service] | |
#which tunnel, or all? | |
Environment="TUNNEL=--all" | |
#log format | |
Environment="LOG_FORMAT=logfmt" | |
#log level | |
Environment="LOG_LEVEL=info" | |
#log file | |
Environment="LOG=/var/log/ngrok.log" | |
#ngrok2 config file (for tunnels/certs etc.) | |
Environment="CONFIG=/home/ubuntu/.ngrok2/ngrok.yml" |
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
# Ubuntu: /lib/systemd/system/ngrok.service | |
# Config (env.conf) placed in ngrok.service.d will be read automatically | |
# YMMV on other distributions | |
[Service] | |
PrivateTmp=true | |
Type=simple | |
StandardOutput=journal | |
StandardError=journal | |
ExecStart=/usr/local/bin/ngrok start ${TUNNEL} --log-format ${LOG_FORMAT} --log-level ${LOG_LEVEL} --log ${LOG} --config ${CONFIG} | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment