Skip to content

Commit

Permalink
[SYSTEMD] updated last few files from pi to ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonWong14 committed Mar 2, 2024
1 parent 8fa2e4d commit 12f3978
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions systemd/ngrok.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ After=net_handler.service

[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/runtime/systemd/
User=ubuntu
WorkingDirectory=/home/ubuntu/runtime/systemd/
ExecStartPre=/bin/sleep 1
ExecStart=/home/pi/runtime/systemd/ngrok.sh
ExecStart=/home/ubuntu/runtime/systemd/ngrok.sh
ExecReload=/bin/kill -SIGINT $MAINPID

[Install]
Expand Down
4 changes: 2 additions & 2 deletions systemd/ngrok.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

function sigint_handler {
pkill -u pi /home/pi/ngrok
pkill -u ubuntu /home/ubuntu/ngrok
}

trap 'sigint_handler' INT

nohup /home/pi/ngrok start --all --config /home/pi/runtime/systemd/ngrok.yml > /dev/null
nohup /home/ubuntu/ngrok start --all --config /home/ubuntu/runtime/systemd/ngrok.yml > /dev/null
4 changes: 2 additions & 2 deletions systemd/ngrok_displayer.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Description=Serves a webpage that displays the ngrok tunnel IP addresses.

[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/runtime/systemd/
User=ubuntu
WorkingDirectory=/home/ubuntu/runtime/systemd/
ExecStart=python3 ngrok_displayer.py
ExecReload=/bin/kill -SIGINT $MAINPID

Expand Down
4 changes: 2 additions & 2 deletions systemd/set_time.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Description=Sets the time on this raspberry pi when on CalVisitor
[Service]
Type=oneshot
User=root
WorkingDirectory=/home/pi
ExecStart=/home/pi/runtime/systemd/set_time.sh
WorkingDirectory=/home/ubuntu
ExecStart=/home/ubuntu/runtime/systemd/set_time.sh
KillSignal=SIGINT

[Install]
Expand Down

0 comments on commit 12f3978

Please sign in to comment.