[Unit]
Description=PiDP-8/I first boot service installation
After=default.target

[Service]
Type=oneshot
ExecStart=/opt/pidp8i/bin/pidp8i install
ExecStartPost=/bin/sh -c 'if [ -f /boot/firmware/wpa_supplicant-wlan0.conf ]; then sudo mv /boot/firmware/wpa_supplicant-wlan0.conf /etc/wpa_supplicant/wpa_supplicant-wlan0.conf && sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan0.conf; fi'
ExecStartPost=/bin/systemctl --user disable pidp8i-firstboot.service
ExecStartPost=/usr/bin/sudo /bin/systemctl reboot

[Install]
WantedBy=default.target
