Release 0.1.37 deployment prep
This commit is contained in:
+24
-55
@@ -30,6 +30,7 @@ chmod 0755 /usr/local/bin/classroom-scale
|
||||
chmod 0755 /usr/local/bin/classroom-shutdown
|
||||
chmod 0755 /usr/local/bin/classroom-chrome-setup
|
||||
chmod 0755 /usr/local/bin/classroom-provision
|
||||
chmod 0755 /usr/local/bin/classroom-printer-setup
|
||||
|
||||
# Reading the optical drive needs group cdrom. Takes effect at the next
|
||||
# login, which the OTA reboot provides.
|
||||
@@ -37,62 +38,14 @@ if getent group cdrom >/dev/null 2>&1; then
|
||||
adduser classroom cdrom >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/ekklesia-classroom/device.conf ]; then
|
||||
cat > /etc/ekklesia-classroom/device.conf <<'CONFIG'
|
||||
# Ekklesia Classroom device configuration
|
||||
# Create device.conf on a new endpoint, or append only settings an older
|
||||
# endpoint does not yet know. The helper preserves every existing byte apart
|
||||
# from the append, so per-room choices always survive an upgrade.
|
||||
PYTHONPATH=/usr/local/lib/ekklesia-classroom python3 - <<'PY'
|
||||
from classroom_config import ensure_device_config
|
||||
|
||||
UPDATE_URL=https://updates.riverofglorymn.org
|
||||
CHANNEL=stable
|
||||
|
||||
# Set to true on classrooms that have a DVD drive.
|
||||
DVD_ENABLED=false
|
||||
|
||||
# Size of the dock, clock and notifications, 0.8 to 1.5.
|
||||
# Larger rooms and larger TVs want a larger number.
|
||||
UI_SCALE=1.0
|
||||
|
||||
# Church message broker. The room is this machine's hostname unless ROOM
|
||||
# is set. Leave MQTT_ENABLED=false until a broker exists.
|
||||
MQTT_ENABLED=false
|
||||
MQTT_HOST=
|
||||
MQTT_PORT=1883
|
||||
MQTT_USERNAME=
|
||||
MQTT_PASSWORD=
|
||||
CONFIG
|
||||
fi
|
||||
|
||||
# Make the settings discoverable on classrooms installed before they
|
||||
# existed. Both defaults are what those rooms already do, so nothing
|
||||
# about their behaviour changes.
|
||||
if ! grep -q '^DVD_ENABLED=' /etc/ekklesia-classroom/device.conf; then
|
||||
cat >> /etc/ekklesia-classroom/device.conf <<'CONFIG'
|
||||
|
||||
# Set to true on classrooms that have a DVD drive.
|
||||
DVD_ENABLED=false
|
||||
CONFIG
|
||||
fi
|
||||
|
||||
if ! grep -q '^UI_SCALE=' /etc/ekklesia-classroom/device.conf; then
|
||||
cat >> /etc/ekklesia-classroom/device.conf <<'CONFIG'
|
||||
|
||||
# Size of the dock, clock and notifications, 0.8 to 1.5.
|
||||
# Larger rooms and larger TVs want a larger number.
|
||||
UI_SCALE=1.0
|
||||
CONFIG
|
||||
fi
|
||||
|
||||
if ! grep -q '^MQTT_ENABLED=' /etc/ekklesia-classroom/device.conf; then
|
||||
cat >> /etc/ekklesia-classroom/device.conf <<'CONFIG'
|
||||
|
||||
# Church message broker. The room is this machine's hostname unless ROOM
|
||||
# is set. Leave MQTT_ENABLED=false until a broker exists.
|
||||
MQTT_ENABLED=false
|
||||
MQTT_HOST=
|
||||
MQTT_PORT=1883
|
||||
MQTT_USERNAME=
|
||||
MQTT_PASSWORD=
|
||||
CONFIG
|
||||
fi
|
||||
ensure_device_config()
|
||||
PY
|
||||
|
||||
# The broker password lives here, so the file stops being world readable.
|
||||
# Everything that reads it runs as root or as the classroom user.
|
||||
@@ -101,6 +54,22 @@ chmod 0640 /etc/ekklesia-classroom/device.conf
|
||||
|
||||
systemctl daemon-reload || true
|
||||
|
||||
# NetworkManager ships nmtui and deliberately leaves interfaces declared in
|
||||
# /etc/network/interfaces under ifupdown's control (managed=false). This gives
|
||||
# administrators saved, auto-reconnecting Wi-Fi without taking over an
|
||||
# existing static Ethernet setup. No classroom service needs to hold boot for
|
||||
# NetworkManager's online wait, so keep that waiter disabled.
|
||||
systemctl enable NetworkManager.service || true
|
||||
systemctl disable NetworkManager-wait-online.service || true
|
||||
systemctl start NetworkManager.service || true
|
||||
|
||||
# CUPS is ready at boot, but no queue is created until an administrator runs
|
||||
# classroom-printer-setup. cups-browsed is unnecessary here and would expose
|
||||
# every advertised printer on the church network if installed independently.
|
||||
systemctl enable cups.socket cups.service || true
|
||||
systemctl disable --now cups-browsed.service || true
|
||||
systemctl start cups.socket || true
|
||||
|
||||
systemctl enable ekklesia-classroom-update.timer || true
|
||||
systemctl start ekklesia-classroom-update.timer || true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user