mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 10:51:36 -04:00
repair.sh: refresh the Portable bootstrap script on installed boxes.
Boxes installed from the Live USB run /usr/local/sbin/wrolpi-bootstrap.sh at every boot, but nothing ever updated it after image build — fixes to the bootstrap (e.g. Postgres bind-mounts on live boots only) could never reach installed systems. Copy the script (and its unit, if installed) from the repo during repair, which both upgrade.sh and install runs execute. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
f500600025
commit
9d778d25a5
1 changed files with 11 additions and 0 deletions
11
repair.sh
11
repair.sh
|
|
@ -70,6 +70,17 @@ chmod 0440 /etc/sudoers.d/90-wrolpi
|
|||
# Verify this new file is valid.
|
||||
visudo -c -f /etc/sudoers.d/90-wrolpi
|
||||
|
||||
# Update the Portable bootstrap on boxes installed from the Live USB; it is
|
||||
# otherwise frozen at image-build time.
|
||||
LIVE_INCLUDES=/opt/wrolpi/debian-live-config/config/includes.chroot
|
||||
if [ -f /usr/local/sbin/wrolpi-bootstrap.sh ]; then
|
||||
cp "${LIVE_INCLUDES}/usr/local/sbin/wrolpi-bootstrap.sh" /usr/local/sbin/wrolpi-bootstrap.sh
|
||||
chmod 0755 /usr/local/sbin/wrolpi-bootstrap.sh
|
||||
if [ -f /etc/systemd/system/wrolpi-bootstrap.service ]; then
|
||||
cp "${LIVE_INCLUDES}/etc/systemd/system/wrolpi-bootstrap.service" /etc/systemd/system/wrolpi-bootstrap.service
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install the systemd services
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi*.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-*.timer /etc/systemd/system/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue