Skip to content

Commit 19fa020

Browse files
committed
Update bootstrap script and rpi config
1 parent 588981d commit 19fa020

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
- run:
4040
command: |
4141
mkdir -p release
42-
tar czf release/bootstrap.tar.gz rpi
42+
cp -a rpi ssl-status-board
43+
tar czf release/bootstrap.tar.gz ssl-status-board
4344
- persist_to_workspace:
4445
root: .
4546
paths:

rpi/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ sudo raspi-config
1212
# Download and extract latest bootstrap archive
1313
wget -qO- https://github.com/RoboCup-SSL/ssl-status-board/releases/latest/download/bootstrap.tar.gz | tar xvz
1414
# Run bootstrap script
15-
./rpi/bootstrap.sh
15+
./ssl-status-board/bootstrap.sh
1616
```

rpi/bootstrap.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
66

77
SRC_VERSION=${1-}
88

9+
function updateSystem() {
10+
sudo apt-get update
11+
sudo apt-get -y dist-upgrade
12+
}
13+
914
function installService() {
10-
if [[ ! -f ~/.local/share/systemd/user/ssl-status-board.service ]]; then
11-
mkdir -p ~/.local/share/systemd/user/
12-
cp "$SCRIPT_DIR/ssl-status-board.service" ~/.local/share/systemd/user/ssl-status-board.service
13-
systemctl --user enable ssl-status-board.service
14-
fi
15+
mkdir -p ~/.local/share/systemd/user/
16+
cp "$SCRIPT_DIR/ssl-status-board.service" ~/.local/share/systemd/user/ssl-status-board.service
17+
systemctl --user enable ssl-status-board.service
1518
}
1619

1720
function installStatusBoard() {
@@ -46,7 +49,13 @@ function installBrowser() {
4649
cp "${SCRIPT_DIR}/.bash_profile" ~/.bash_profile
4750
}
4851

49-
sudo apt-get update
52+
updateSystem
5053
installService
5154
installStatusBoard
5255
installBrowser
56+
57+
echo "You may need to restart the system to apply some settings. Reboot now? (y/n)"
58+
read -r response
59+
if [[ "${response}" == "y" ]]; then
60+
sudo reboot
61+
fi

rpi/ssl-status-board.service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
[Unit]
2-
description=Launches SSL Status Board
32
Wants=network-online.target
43
After=network-online.target
54

65
[Service]
76
Type=simple
87
ExecStart=%h/.local/bin/ssl-status-board
98
Restart=always
9+
RestartSec=5
10+
StartLimitInterval=0
1011

1112
[Install]
1213
WantedBy=default.target

0 commit comments

Comments
 (0)