Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYSTEMD] updated last few files from pi to ubuntu #274

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading