Added Mycroft service.
This commit is contained in:
parent
bc24c3a243
commit
6d75d33fce
@ -144,6 +144,24 @@ mount "${loopdev}p1" /mnt/boot
|
||||
# Things are mounted now, so set mounted to 0 (bash true)
|
||||
mounted=0
|
||||
wget "${url[$imageVersion]}" -O- | bsdtar -xpf - -C /mnt
|
||||
# Create Mycroft service file
|
||||
cat << 'EOF' > /mnt/etc/systemd/system/mycroft.service
|
||||
[Unit]
|
||||
Description=Mycroft AI
|
||||
After=pulseaudio.service
|
||||
|
||||
[Service]
|
||||
User=mycroft
|
||||
WorkingDirectory=/home/mycroft/
|
||||
ExecStart=/home/mycroft/mycroft-core/bin/mycroft-start all
|
||||
ExecStop=/home/mycroft/mycroft-core/bin/mycroft-stop
|
||||
Type=forking
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
arch-chroot /mnt << EOF
|
||||
# set up pacman
|
||||
pacman-key --init
|
||||
@ -182,8 +200,9 @@ sed '/mycroft/d' /etc/sudoers.d/wheel
|
||||
sed 's/^# %wheel ALL=(ALL) ALL$/%wheel ALL=(ALL) ALL/' /etc/sudoers.d/wheel
|
||||
# Set the hostname
|
||||
echo mycroft > /etc/hostname
|
||||
|
||||
# Enable services
|
||||
systemctl enable sshd
|
||||
systemctl enable mycroft sshd
|
||||
# Update fstab for Raspberry Pi 4.
|
||||
#[[ $imageVersion -eq 4 ]] && sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user