Skip to content

Commit b7311e4

Browse files
committed
Ensure that config folder exists
1 parent 01ff1e6 commit b7311e4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

rpi/bootstrap.sh

Lines changed: 6 additions & 5 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="$HOME/.config/ssl-remote-control/remote-control-config.env"
6+
CONFIG_ENV_FILE="$HOME/.config/ssl-remote-control/remote-control-config.env"
77
SRC_VERSION=${1:-}
88

99
function updateSystem() {
@@ -15,11 +15,12 @@ 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
19-
echo "Copying remote control configuration file to ${CONFIG_FILE_DIR}"
20-
cp "${SCRIPT_DIR}/remote-control-config.env" "${CONFIG_FILE_DIR}"
18+
if [[ ! -f "${CONFIG_ENV_FILE}" ]]; then
19+
mkdir -p "${CONFIG_ENV_FILE}"
20+
echo "Copying remote control configuration file to ${CONFIG_ENV_FILE}"
21+
cp "${SCRIPT_DIR}/remote-control-config.env" "${CONFIG_ENV_FILE}"
2122
else
22-
echo "Found remote control configuration file at ${CONFIG_FILE_DIR} skipping"
23+
echo "Found remote control configuration file at ${CONFIG_ENV_FILE} skipping"
2324
fi
2425
}
2526

0 commit comments

Comments
 (0)