When I start mycroft with systemctl, either the permissions are wrong, or it can’t access pulse/alsa correctly.
I installed mycroft under my linux (ubuntu) user home directory:
/home/username/mycroft-core
I run it successfully from the mycroft-core directory with: sudo ./start-mycroft.sh all
Then I run the same command with the cli to access the command interface.
However, when I (after stopping mycroft) try to run it with as a daemon via systemctl, I can’t get it to work correctly.
Depending on the various settings I’ve had all sorts of issues, but I think now I’ve narrowed them all down to either something with permissions and/or the working directory.
In my /home/username/ directory I have .mycroft with skills and config and all.
It seems like perhaps this shouldbe the working directory in my .service - but if I run with my username it fails permissions. If I run as root, it doesn’t recognize my home.mycroft.ai pairing.
What gives?
.service config:
[Unit]
Description=Mycroft personal AI
After=pulseaudio.service
[Service]
User=root
WorkingDirectory=/home/username/.mycroft
ExecStart=/home/username/mycroft-core/start-mycroft.sh all
ExecStop=/home/username/mycroft-core/stop-mycroft.sh
Type=forking
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target