diff --git a/arcroft/build-arcroft.sh b/arcroft/build-arcroft.sh index 922d4c5..23df8d9 100755 --- a/arcroft/build-arcroft.sh +++ b/arcroft/build-arcroft.sh @@ -148,7 +148,8 @@ wget "${url[$imageVersion]}" -O- | bsdtar -xpf - -C /mnt cat << 'EOF' > /mnt/etc/systemd/system/mycroft.service [Unit] Description=Mycroft AI -After=pulseaudio.service +After=pulseaudio.service mycroft-update.service +Requires=mycroft-update.service [Service] User=mycroft @@ -162,6 +163,19 @@ Restart=no WantedBy=multi-user.target EOF +cat << 'EOF' > /mnt/etc/systemd/system/mycroft-update.service +[Unit] +Description=Mycroft AI +After=network.target + +[Service] +ExecStartPre=/usr/bin/runuser -u mycroft -- /usr/bin/git pull -C /home/mycroft/mycroft-core +ExecStart=/usr/bin/bash /home/mycroft/mycroft-core/dev_setup.sh +RemainAfterExit=no +Type=simple +Restart=no +EOF + arch-chroot /mnt << EOF # set up pacman pacman-key --init