From e86d052f5ac7fe465b6592dcb7eda14c8d690ea4 Mon Sep 17 00:00:00 2001 From: deflax Date: Thu, 14 Nov 2024 00:44:29 +0200 Subject: [PATCH] deploy the native patch earlier during first boot --- prepare-image.sh | 1 + src/payload.service | 1 + src/setup.sh | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/prepare-image.sh b/prepare-image.sh index 23bdaab..3f3cb01 100755 --- a/prepare-image.sh +++ b/prepare-image.sh @@ -47,6 +47,7 @@ wget https://github.com/DISTRHO/Cardinal/releases/download/24.09/Cardinal-linux- tar -xzvf /tmp/rpi-img/opt/Cardinal/Cardinal-linux-aarch64.tar.gz -C /tmp/rpi-img/opt/Cardinal/ CardinalNative # setup GUI payload +cp -v ./src/payload.service /tmp/rpi-img/lib/systemd/system/payload.service ln -v -s /lib/systemd/system/payload.service /tmp/rpi-img/etc/systemd/system/graphical.target.wants echo "] press enter to write the image" diff --git a/src/payload.service b/src/payload.service index 65eb450..991dab0 100644 --- a/src/payload.service +++ b/src/payload.service @@ -11,6 +11,7 @@ Restart=always RestartSec=10s KillMode=process TimeoutSec=infinity +ConditionFileNotEmpty=/home/pi/Documents/templates/native.vcv [Install] WantedBy=graphical.target diff --git a/src/setup.sh b/src/setup.sh index bc9c199..6ed3fb2 100755 --- a/src/setup.sh +++ b/src/setup.sh @@ -1,5 +1,10 @@ #!/bin/bash +# deploy native patch +mkdir -vp /home/pi/Documents/templates/ +cp -v /root/native.vcv /home/pi/Documents/templates/native.vcv +chown -R pi:pi /home/pi/Documents/templates/ + # upgrade system apt-get update apt-get upgrade -y @@ -15,11 +20,6 @@ apt-get install ufw -y ufw allow ssh ufw enable -# deploy native patch -mkdir -vp /home/pi/Documents/templates/ -cp -v /root/native.vcv /home/pi/Documents/templates/native.vcv -chown -R pi:pi /home/pi/Documents/templates/ - # cleanup mv /root/setup.sh /root/setup.sh.done chmod -x /root/setup.sh.done