diff --git a/systemd/ngrok.service b/systemd/ngrok.service index 2ad3e310..a3036ba0 100644 --- a/systemd/ngrok.service +++ b/systemd/ngrok.service @@ -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] diff --git a/systemd/ngrok.sh b/systemd/ngrok.sh index 68c85001..526793a4 100755 --- a/systemd/ngrok.sh +++ b/systemd/ngrok.sh @@ -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 diff --git a/systemd/ngrok_displayer.service b/systemd/ngrok_displayer.service index 56789997..6b8ddd52 100644 --- a/systemd/ngrok_displayer.service +++ b/systemd/ngrok_displayer.service @@ -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 diff --git a/systemd/set_time.service b/systemd/set_time.service index 04a4f983..9a399338 100644 --- a/systemd/set_time.service +++ b/systemd/set_time.service @@ -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]