Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Rework for packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Landrash committed Feb 25, 2017
1 parent c6f0423 commit b3d6289
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 13 deletions.
Empty file added etc/hassbian/suite-states
Empty file.
Empty file added etc/hassbian/suite-states.lock
Empty file.
2 changes: 2 additions & 0 deletions etc/sudoers.d/020_homeassistant_hassbian-scripts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%homeassistant ALL= NOPASSWD: /usr/bin/hassbian-config show *
%homeassistant ALL= NOPASSWD: /usr/bin/hassbian-config install *
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,21 @@ echo "Changing to Home Assistant venv"
source /srv/homeassistant/bin/activate
echo "Installing latest version of Home Assistant"
pip3 install homeassistant
pip3 install homeassistant hassbian
echo "Deactivating virtualenv"
deactivate
EOF

echo "Changing to the pi user"
sudo -u pi -H /bin/bash << EOF
######### REPLACE WITH HASSBIAN deb package #########

echo "Downloading HASSbian helper scripts"
cd /home/pi
git clone https://github.com/home-assistant/hassbian-scripts.git
EOF
#echo "Changing to the pi user"
#sudo -u pi -H /bin/bash << EOF

#echo "Downloading HASSbian helper scripts"
#cd /home/pi
#git clone https://github.com/home-assistant/hassbian-scripts.git
#EOF

echo "Enabling Home Assistant service"
systemctl enable [email protected]
Expand All @@ -57,9 +59,9 @@ ip_address=$(ifconfig | awk -F':' '/inet addr/&&!/127.0.0.1/{split($2,_," ");pri
echo
echo "Installation done."
echo
echo "Your Home Assistant installation is running at $ip_address:8123"
echo "Your Home Assistant installation is running at $ip_address:8123 or if prefered http://hassbian.local:8123"
echo
echo "To continue have a look at https://home-assistant.io/getting-started/configuration"
echo "To continue have a look at https://home-assistant.io/getting-started/configuration/"
echo
echo "If this script failed then this Raspberry Pi most likely did not have a fully functioning internet connection."
echo "If you still have issues with this script, please contact @Landrash on gitter.im"
Expand All @@ -68,4 +70,4 @@ return 0
}

# Make this script function as it always has if run standalone, rather than issue a warning and do nothing.
[[ $_ == $0 ]] && homeassistant-install-package
[[ $0 == "$BASH_SOURCE" ]] && homeassistant-install-package
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ apt-get install -y mosquitto mosquitto-clients
echo "Writing default configuration"
cd /etc/mosquitto
mv mosquitto.conf mosquitto.conf.backup
cp /home/pi/hassbian-scripts/files/mosquitto.conf /etc/mosquitto/mosquitto.conf
cp /opt/hassbian/suites/files/mosquitto.conf /etc/mosquitto/mosquitto.conf
chown mosquitto:mosquitto mosquitto.conf

echo "Initializing password file"
Expand Down Expand Up @@ -87,7 +87,9 @@ ip_address=$(ifconfig | awk -F':' '/inet addr/&&!/127.0.0.1/{split($2,_," ");pri
echo
echo "Installation done!"
echo
echo "Your MQTT broker is running at $ip_address:1883"
echo "Your MQTT broker is running at $ip_address:1883 or if prefered hassbian.local"
echo
echo "To continue have a look at https://home-assistant.io/docs/mqtt/"
echo
echo "If you have issues with this script, please contact @Landrash on gitter.im"
echo "Original script by @dale3h on gitter.im"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion hassbian-config → usr/local/bin/hassbian-config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

SUITE_INSTALL_DIR=/home/pi/hassbian-scripts
SUITE_INSTALL_DIR=/opt/hassbian/suites
SUITE_INSTALL_DB=/etc/hassbian/suite-states
SUITE_INSTALL_DB_LOCK=/etc/hassbian/suite-states.lock

Expand Down

0 comments on commit b3d6289

Please sign in to comment.