mycroft: Run the files from /var

To avoid errors when running on a read only /lib/ file system copy the
files to /var and run mycroft from there.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Alistair Francis 2019-10-15 15:54:22 -07:00 committed by Khem Raj
parent 74aa0be637
commit d8e71b65a8
3 changed files with 6 additions and 4 deletions

View File

@ -5,7 +5,8 @@ After=systemd-user-sessions.service
[Service]
Type=oneshot
ExecStart=@LIBDIR@/mycroft/dev_setup.sh --allow-root
ExecStart=cp -rf @LIBDIR@/mycroft /var/
ExecStart=/var/mycroft/dev_setup.sh --allow-root
[Install]
WantedBy=multi-user.target

View File

@ -5,10 +5,10 @@ After=mycroft-setup.service
[Service]
Type=forking
WorkingDirectory=@LIBDIR@/mycroft
WorkingDirectory=/var/mycroft
ExecStartPre=mkdir -p /var/log/mycroft
ExecStart=@LIBDIR@/mycroft/start-mycroft.sh all
ExecStop=@LIBDIR@/mycroft/stop-mycroft.sh all
ExecStart=/var/mycroft/start-mycroft.sh all
ExecStop=/var/mycroft/stop-mycroft.sh all
[Install]
WantedBy=multi-user.target

View File

@ -24,6 +24,7 @@ inherit systemd
# Mycroft installs itself on the host
# Just copy the setup files to the rootfs
# The mycroft-setup service will copy the files to /var/ where we run them from
do_install() {
install -d ${D}${libdir}/
cp -r ${B} ${D}${libdir}/mycroft