Skip to content

Commit 02aaa6f

Browse files
committed
Update to match os2borgerpc-kiosk-image v3.0.0
1 parent a9173d1 commit 02aaa6f

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

scripts/DEPENDENCIES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ python3-yaml
66
curl
77
pwgen
88
ntpdate
9+
jq

scripts/install_dependencies.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ if [ "$PKGS_TO_INSTALL" != "" ]; then
7474
fi
7575
fi
7676

77-
# Install os2borgerpc client
78-
pip3 install os2borgerpc-client
79-
8077
# Install Danish language package
8178
apt-get -y install language-pack-da language-pack-da-base
8279

@@ -94,4 +91,4 @@ dpkg-reconfigure --frontend=noninteractive tzdata
9491
update-locale LANG=da_DK.utf-8
9592

9693
# Update the time accordingly
97-
ntpdate pool.ntp.org
94+
ntpdate pool.ntp.org

scripts/os2borgerpc_kiosk_setup

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,27 @@ mkdir -p /etc/os2borgerpc/security/
2828

2929
# Set product in configuration
3030
PRODUCT="os2borgerpc kiosk"
31-
set_os2borgerpc_config os2_product "$PRODUCT"
31+
echo "os2_product: $PRODUCT" >> /etc/os2borgerpc/os2borgerpc.conf
3232

3333
# Set version in configuration
3434
VERSION=$(cat "$DIR"/VERSION)
35-
set_os2borgerpc_config os2borgerpc_version "$VERSION"
35+
echo "os2borgerpc_version: $VERSION" >> /etc/os2borgerpc/os2borgerpc.conf
36+
37+
# Insert values from config.cfg that are prefixed with 'DEFAULT_' into os2borgerpc.conf.
38+
# Path to the configuration file
39+
CONFIG_FILE="$DIR/config.cfg"
40+
41+
# Read each line in the configuration file and reformat it
42+
while IFS='=' read -r key value; do
43+
# Skip empty lines, lines without '=', and lines starting with '#'
44+
if [[ -n "$key" && -n "$value" && "$key" != \#* ]]; then
45+
# Convert key to lowercase and remove "DEFAULT_" prefix
46+
lowercase_key=$(echo "$key" | sed 's/^DEFAULT_//' | tr '[:upper:]' '[:lower:]')
47+
48+
# Write in "key: value" format
49+
echo "${lowercase_key}: ${value}" >> /etc/os2borgerpc/os2borgerpc.conf
50+
fi
51+
done < "$CONFIG_FILE"
3652

3753
# Setup Chromium user
3854
USER="chrome"
@@ -90,4 +106,4 @@ Dpkg::Lock {Timeout "300";};
90106
EOF
91107

92108
# Connect to the admin system
93-
register_new_os2borgerpc_client.sh
109+
install_client_and_register.sh

0 commit comments

Comments
 (0)