Last active
February 3, 2019 11:58
-
-
Save ludeeus/e297742f3b3a7968d3cbe8534d181046 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Must be run as root | |
git clone https://github.com/ludeeus/custom-component-store.git /tmp/custom-component-store | |
cd /tmp/custom-component-store/rootfs/opt/store/ | |
sed -i "s,/config,/home/homeassistant/.homeassistant,g" componentstore/const.py | |
sed -i "s,/config,/home/homeassistant/.homeassistant,g" componentstore/server.py | |
python3 setup.py install | |
touch /etc/systemd/system/[email protected] | |
cat <<EOT >> /etc/systemd/system/[email protected] | |
# | |
# Service file for systems with systemd to run custom-component-store as the homeassistant user. | |
# | |
[Unit] | |
Description=custom-component-store for %i | |
After=network.target | |
[Service] | |
Type=simple | |
User=%i | |
ExecStart=/usr/local/bin/componentstore --port 8120 --nocache | |
SendSIGKILL=no | |
[Install] | |
WantedBy=multi-user.target | |
EOT | |
systemctl enable [email protected] | |
sync | |
systemctl start [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment