diff options
author | Rafael Reggiani Manzo | 2016-12-27 10:38:25 -0200 |
---|---|---|
committer | Rafael Reggiani Manzo | 2016-12-27 10:38:25 -0200 |
commit | 69be2dcc091d62243567be82f87757a9ca8736e9 (patch) | |
tree | 51a8c5e047a6b364e269c356077135635ca6fab7 /mycroft-core.install | |
parent | 056e8f15349789cf6665727a5d25996f9d787b1f (diff) | |
download | aur-69be2dcc091d62243567be82f87757a9ca8736e9.tar.gz |
Create user systemd units
Those are a better solution for the audio issues, since PulseAudio
itself does not recoomend to get it running as a system instance and
Gnome also is not able to manage the audio preferences with such
configuration.
The units provide a standard interface to starting mycroft services
allowing even multiple user installations each one paired independently.
Diffstat (limited to 'mycroft-core.install')
-rw-r--r-- | mycroft-core.install | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/mycroft-core.install b/mycroft-core.install index 815e84815d06..3ccd7bea8630 100644 --- a/mycroft-core.install +++ b/mycroft-core.install @@ -1,11 +1,11 @@ pre_install() { - useradd -r mycroft-core -b /usr/share -G audio + useradd -r mycroft-core -b /usr/share } post_install() { chown -R mycroft-core:mycroft-core /usr/share/mycroft-core + chmod g+w /usr/share/mycroft-core - # install packages touch /usr/share/mycroft-core/.bashrc echo "# Virtualenv initialization" >> /usr/share/mycroft-core/.bashrc echo "export WORKON_HOME=\$HOME/.virtualenvs" >> /usr/share/mycroft-core/.bashrc @@ -16,6 +16,24 @@ post_install() { sudo -u mycroft-core bash -c 'source ~/.bashrc && mkvirtualenv mycroft --system-site-packages -p $(which python2)' sudo -u mycroft-core bash -c 'source ~/.bashrc && workon mycroft && pip install -r /usr/share/mycroft-core/requirements.txt' + + echo "*** ATTENTION ***" + echo "" + echo "* The users who will use Mycroft need to be part of the mycroft-core group" + echo "" + echo "* You can configure your Mycroft instance preferences systemwide at:" + echo " /usr/share/mycroft-core/mycroft/configuration/mycroft.conf" + echo "" + echo "* The systemd units are" + echo " - mycroft.target" + echo " - mycroft-service.service" + echo " - mycroft-skills.service" + echo " - mycroft-voice.service" + echo "" + echo "* Those are USER units which you can start issuing:" + echo " systemctl --user start mycroft.target" + echo " More information at: https://wiki.archlinux.org/index.php/Systemd/User" + } post_upgrade() { @@ -25,8 +43,4 @@ post_upgrade() { post_remove() { userdel mycroft-core rm -rf /usr/share/mycroft-core - - echo "ATTENTION:" - echo "If you are using PulseAudio, please be sure to be running it on system mode" - echo "You should configure it at /etc/pulse/daemon.conf" } |