Polishing up
This commit is contained in:
parent
f5e9a950be
commit
4eb77fd9eb
7
config
7
config
@ -13,3 +13,10 @@ FIRST_USER_PASS="letmein"
|
|||||||
DISABLE_FIRST_BOOT_USER_RENAME=1
|
DISABLE_FIRST_BOOT_USER_RENAME=1
|
||||||
WPA_COUNTRY=US
|
WPA_COUNTRY=US
|
||||||
ENABLE_SSH=0
|
ENABLE_SSH=0
|
||||||
|
STAGE_LIST=""
|
||||||
|
for d in stage*; do
|
||||||
|
if [ -d "$d" ] && [ ! -f "$d/SKIP" ]; then
|
||||||
|
STAGE_LIST+="$d "
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
STAGE_LIST="$(echo "$STAGE_LIST" | xargs)"
|
||||||
|
6
runtime-patches.sh
Executable file
6
runtime-patches.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Patches to run before building showpieceos
|
||||||
|
# Allows for non-destructive deletion of files
|
||||||
|
|
||||||
|
rm stage2/EXPORT_IMAGE
|
6
stage3/01-showpiece-browser/01-run.sh
Executable file
6
stage3/01-showpiece-browser/01-run.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
install -d -o 1000 -g 1000 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart"
|
||||||
|
install -m 644 files/kiosk.desktop "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart/"
|
||||||
|
chown -R 1000:1000 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.config
|
||||||
|
mkdir -p "${ROOTFS_DIR}/tmp"
|
6
stage3/01-showpiece-browser/files/kiosk.desktop
Normal file
6
stage3/01-showpiece-browser/files/kiosk.desktop
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Chromium
|
||||||
|
Exec=chromium-browser --profile-directory="showpiece-browser" --kiosk https://showpiece.sanin.dev/
|
||||||
|
StartupNotify=false
|
||||||
|
Terminal=false
|
4
stage4/99-force-hdmi-1/00-run.sh
Executable file
4
stage4/99-force-hdmi-1/00-run.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
echo "Setting custom cmdline"
|
||||||
|
sed -i 's/$/ video=HDMI-A-1:1920x1080M@60/' "${ROOTFS_DIR}/boot/firmware/cmdline.txt"
|
@ -1,4 +1,4 @@
|
|||||||
IMG_SUFFIX=""
|
IMG_SUFFIX="-client"
|
||||||
if [ "${USE_QEMU}" = "1" ]; then
|
if [ "${USE_QEMU}" = "1" ]; then
|
||||||
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
|
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
|
||||||
fi
|
fi
|
||||||
|
11
stage9/02-showpiece/01-run.sh
Executable file
11
stage9/02-showpiece/01-run.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece"
|
||||||
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece/config"
|
||||||
|
install -m 644 files/docker-compose.yml "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece/"
|
||||||
|
install -m 644 files/config.json5 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece/config/"
|
||||||
|
install -d -o 1000 -g 1000 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart"
|
||||||
|
install -m 644 files/kiosk.desktop "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart/"
|
||||||
|
chown -R 1000:1000 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.config
|
||||||
|
mkdir -p "${ROOTFS_DIR}/tmp"
|
||||||
|
echo "$FIRST_USER_NAME" > "${ROOTFS_DIR}/tmp/first_username"
|
12
stage9/02-showpiece/02-run-chroot.sh
Executable file
12
stage9/02-showpiece/02-run-chroot.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
USERNAME=$(cat /tmp/first_username)
|
||||||
|
COMPOSEFILE="/home/$USERNAME/.config/showpiece/docker-compose.yml"
|
||||||
|
|
||||||
|
echo "@reboot docker compose --file '$COMPOSEFILE' up -d && chromium --kiosk 'http://localhost:8080/?w=1080'" >> /tmp/user.crontab
|
||||||
|
echo "40 3 * * * docker compose --file '$COMPOSEFILE' pull && docker compose --file '$COMPOSEFILE' up -d" >> /tmp/user.crontab
|
||||||
|
|
||||||
|
crontab -u "$USERNAME" /tmp/user.crontab
|
||||||
|
|
||||||
|
rm /tmp/first_username
|
||||||
|
rm /tmp/user.crontab
|
14
stage9/02-showpiece/files/config.json5
Normal file
14
stage9/02-showpiece/files/config.json5
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
// Port for the viewer
|
||||||
|
"port": 8080,
|
||||||
|
// Port for the control panel
|
||||||
|
// (use a different port to restrict access to this interface)
|
||||||
|
"controlport": 8080,
|
||||||
|
// (optional) provide weather data to modules that support it
|
||||||
|
"weather": {
|
||||||
|
// Provide an OpenWeatherMap API key
|
||||||
|
// https://openweathermap.org/price
|
||||||
|
// "key": "not0a0real0key00281f631aef6ad3a1",
|
||||||
|
// "city": "chicago"
|
||||||
|
}
|
||||||
|
}
|
10
stage9/02-showpiece/files/docker-compose.yml
Normal file
10
stage9/02-showpiece/files/docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
services:
|
||||||
|
showpiece:
|
||||||
|
container_name: showpiece
|
||||||
|
image: corysanin/showpiece:latest
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
- ./config:/usr/src/showpiece/config
|
6
stage9/02-showpiece/files/kiosk.desktop
Normal file
6
stage9/02-showpiece/files/kiosk.desktop
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Chromium
|
||||||
|
Exec=chromium-browser --profile-directory="showpiece-browser" --kiosk http://localhost:8080/?w=1080
|
||||||
|
StartupNotify=false
|
||||||
|
Terminal=false
|
4
stage9/EXPORT_IMAGE
Normal file
4
stage9/EXPORT_IMAGE
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
IMG_SUFFIX="-standalone"
|
||||||
|
if [ "${USE_QEMU}" = "1" ]; then
|
||||||
|
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
|
||||||
|
fi
|
5
stage9/prerun.sh
Executable file
5
stage9/prerun.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
if [ ! -d "${ROOTFS_DIR}" ]; then
|
||||||
|
copy_previous
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user