Skip to content

Commit e6b3d18

Browse files
Merge pull request #274 from pioneers/systemd-update
[SYSTEMD] updated last few files from pi to ubuntu
2 parents 8fa2e4d + d95cf43 commit e6b3d18

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

.github/workflows/pull_request_ci.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
# First, we check out the repository's code using the Github Actions' "Checkout" tool.
2727
- name: Checkout code
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929
with:
3030
submodules: 'recursive'
3131

@@ -59,7 +59,7 @@ jobs:
5959
sudo chown root:root /usr/bin/tar && sudo chmod u+s /usr/bin/tar
6060
- name: Cache protobuf-c
6161
id: cache-protobuf-c
62-
uses: actions/cache@v3 # Uses the Github Actions' "Cache" tool
62+
uses: actions/cache@v4 # Uses the Github Actions' "Cache" tool
6363
with:
6464
# These are the files we cache
6565
path: |
@@ -74,6 +74,15 @@ jobs:
7474
run: |
7575
sudo chown runner:runner /usr/bin/tar && sudo chmod u+x /usr/bin/tar
7676
77+
# Before we build Runtime, we check the formatting
78+
- name: Debug
79+
run: |
80+
ls
81+
pwd
82+
- name: Format
83+
run: |
84+
./runtime format check
85+
7786
# This if statement determine whether the cache lookup was a hit (true) or miss (not true--idk, false doesn't work)
7887
# If the cache lookup hit, we just run "sudo ldconfig" to tell the linker where to look for
7988
# protobuf-c files. If the cache lookup missed, we have to install protobuf-c from scratch
@@ -89,11 +98,6 @@ jobs:
8998
tar -xzf protobuf-c-1.4.1.tar.gz
9099
cd protobuf-c-1.4.1 && ./configure && make && sudo make install && sudo ldconfig
91100
92-
# Before we build Runtime, we check the formatting
93-
- name: Format
94-
run: |
95-
./runtime format check
96-
97101
# Now that we are done installing Runtime's dependencies, we build Runtime
98102
- name: Build
99103
run: |

systemd/ngrok.service

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ After=net_handler.service
44

55
[Service]
66
Type=simple
7-
User=pi
8-
WorkingDirectory=/home/pi/runtime/systemd/
7+
User=ubuntu
8+
WorkingDirectory=/home/ubuntu/runtime/systemd/
99
ExecStartPre=/bin/sleep 1
10-
ExecStart=/home/pi/runtime/systemd/ngrok.sh
10+
ExecStart=/home/ubuntu/runtime/systemd/ngrok.sh
1111
ExecReload=/bin/kill -SIGINT $MAINPID
1212

1313
[Install]

systemd/ngrok.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22

33
function sigint_handler {
4-
pkill -u pi /home/pi/ngrok
4+
pkill -u ubuntu /home/ubuntu/ngrok
55
}
66

77
trap 'sigint_handler' INT
88

9-
nohup /home/pi/ngrok start --all --config /home/pi/runtime/systemd/ngrok.yml > /dev/null
9+
nohup /home/ubuntu/ngrok start --all --config /home/ubuntu/runtime/systemd/ngrok.yml > /dev/null

systemd/ngrok_displayer.service

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Description=Serves a webpage that displays the ngrok tunnel IP addresses.
33

44
[Service]
55
Type=simple
6-
User=pi
7-
WorkingDirectory=/home/pi/runtime/systemd/
6+
User=ubuntu
7+
WorkingDirectory=/home/ubuntu/runtime/systemd/
88
ExecStart=python3 ngrok_displayer.py
99
ExecReload=/bin/kill -SIGINT $MAINPID
1010

systemd/set_time.service

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Description=Sets the time on this raspberry pi when on CalVisitor
44
[Service]
55
Type=oneshot
66
User=root
7-
WorkingDirectory=/home/pi
8-
ExecStart=/home/pi/runtime/systemd/set_time.sh
7+
WorkingDirectory=/home/ubuntu
8+
ExecStart=/home/ubuntu/runtime/systemd/set_time.sh
99
KillSignal=SIGINT
1010

1111
[Install]

0 commit comments

Comments
 (0)