- frpc-config: pre-configure frpc tunnels (SSH/Jellyfin/Navidrome) - navidrome-autoinit: auto-create Navidrome container on first boot - expand-overlay: auto-resize eMMC overlay partition
20 lines
565 B
Bash
20 lines
565 B
Bash
#!/bin/sh
|
|
# /etc/uci-defaults/99-expand-overlay
|
|
# Stage 1: Resize partition table to fill unallocated eMMC space.
|
|
# Auto-removed by uci-defaults after first run.
|
|
|
|
FLAG_FILE="/etc/expand-overlay.done"
|
|
|
|
[ -f "$FLAG_FILE" ] && exit 0
|
|
|
|
# Only run if root is on eMMC
|
|
ROOT_DEV=$(mount | grep ' / ' | awk '{print $1}' | sed 's/p[0-9]*$//')
|
|
[ "$ROOT_DEV" != "/dev/mmcblk2" ] && exit 0
|
|
|
|
# Save backup, resize partition 3 to fill remaining space
|
|
sfdisk -d /dev/mmcblk2 > /etc/sfdisk.bak 2>/dev/null
|
|
echo ",+" | sfdisk -N 3 /dev/mmcblk2 2>/dev/null
|
|
|
|
touch "$FLAG_FILE"
|
|
exit 0
|