From 4cc805e5658c5e05bc525719b555d10fa91e314f Mon Sep 17 00:00:00 2001 From: Filip Borum Poulsen Date: Sun, 8 Dec 2024 20:10:26 +0100 Subject: [PATCH] Added ngrok --- install.sh | 3 +++ ngrok.service | 16 ++++++++++++++++ ngrok.yml | 9 +++++++++ 3 files changed, 28 insertions(+) create mode 100644 ngrok.service create mode 100644 ngrok.yml diff --git a/install.sh b/install.sh index f4ce5ee..a3f2d17 100644 --- a/install.sh +++ b/install.sh @@ -27,11 +27,14 @@ sudo systemctl restart smbd sudo cp video-player.service /etc/systemd/system/video-player.service sudo cp video-player2.service /etc/systemd/system/video-player2.service +sudo cp ngrok.service /etc/systemd/system/ngrok.service sudo systemctl daemon-reload sudo systemctl enable video-player.service sudo systemctl disable video-player2.service +sudo systemctl enable ngrok.service sudo systemctl restart video-player.service sudo systemctl restart video-player2.service +sudo systemctl restart ngrok.service mkdir ~/.config/autostart cp clock.desktop ~/.config/autostart/clock.desktop diff --git a/ngrok.service b/ngrok.service new file mode 100644 index 0000000..718d5a8 --- /dev/null +++ b/ngrok.service @@ -0,0 +1,16 @@ +[Unit] +Description=Start ngrok tunnel on startup +After=network-online.target +Wants=network-online.target systemd-networkd-wait-online.service + +[Service] +ExecStart=/usr/local/bin/ngrok start --all --config /home/pi/video-player/ngrok.yml +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +IgnoreSIGPIPE=true +Restart=always +RestartSec=3 +Type=simple + +[Install] +WantedBy=multi-user.target diff --git a/ngrok.yml b/ngrok.yml new file mode 100644 index 0000000..10a381f --- /dev/null +++ b/ngrok.yml @@ -0,0 +1,9 @@ +version: "2" +authtoken: 1k2wMCOOCZjQvG5SYyLqUZ0Zj2H_6JYyv1HG2GJwFJ5iGfwgi +tunnels: + web: + proto: http + addr: 8080 + domain: crawdad-deciding-wahoo.ngrok-free.app + basic_auth: + - pi:steady123