Skip to content

Commit 45e4566

Browse files
AlexSchmitz222g3force
authored andcommitted
changed config to .env file format.
adapted code to new bash format updated readme
1 parent 2a3bb33 commit 45e4566

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

rpi/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ wget -qO- https://github.com/RoboCup-SSL/ssl-remote-control/releases/latest/down
2222
```
2323
### Optionally change the team color to BLUE in
2424
```shell
25-
~/.config/ssl-remote-control/remote-control-config.txt
25+
~/.config/ssl-remote-control/remote-control-config.env
2626
```
2727
## Note an Chromium vs. nw.js
2828

rpi/bootstrap.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -Eeuo pipefail
44

55
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
6-
CONFIG_FILE_DIR=~/.config/ssl-remote-control/remote-control-config.txt
6+
CONFIG_FILE_DIR="$HOME/.config/ssl-remote-control/remote-control-config.env"
77
SRC_VERSION=${1-}
88

99
function updateSystem() {
@@ -15,9 +15,9 @@ function installService() {
1515
mkdir -p ~/.local/share/systemd/user/
1616
cp "$SCRIPT_DIR/ssl-remote-control.service" ~/.local/share/systemd/user/ssl-remote-control.service
1717
systemctl --user enable ssl-remote-control.service
18-
if [ ! -f ${CONFIG_FILE_DIR}]; then
18+
if [[ ! -f "${CONFIG_FILE_DIR}" ]]; then
1919
echo "Copying remote control configuration file to ${CONFIG_FILE_DIR}"
20-
sudo cp "${SCRIPT_DIR}/remote-control-config.txt ${CONFIG_FILE_DIR}"
20+
cp "${SCRIPT_DIR}/remote-control-config.txt ${CONFIG_FILE_DIR}"
2121
else
2222
echo "Found remote control configuration file at ${CONFIG_FILE_DIR} skipping"
2323
fi

rpi/remote-control-config.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TEAM_COLOR=YELLOW

rpi/remote-control-config.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

rpi/ssl-remote-control.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ After=network-online.target
44

55
[Service]
66
Type=simple
7-
EnvironmentFile=~/.config/ssl-remote-control/remote-control-config.txt
8-
ExecStart=%h/.local/bin/ssl-remote-control -team $team
7+
EnvironmentFile=~/.config/ssl-remote-control/remote-control-config.env
8+
ExecStart=%h/.local/bin/ssl-remote-control -team $TEAM_COLOR
99
Restart=always
1010
RestartSec=5
1111
StartLimitInterval=0

0 commit comments

Comments
 (0)