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

Commit

Permalink
AppDaemon: Added option to expose config to samba (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored and Landrash committed Jan 27, 2018
1 parent 7523231 commit 3898f9f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions package/opt/hassbian/suites/install_appdaemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@ sync
echo "Starting AppDaemon service"
systemctl start appdaemon@homeassistant.service

if [ -f "/usr/sbin/samba" ]; then
read -p "Do you want to add samba share for AppDaemon configuration? [N/y] : " SAMBA
if [ "$SAMBA" == "y" ] || [ "$SAMBA" == "Y" ]; then
echo "Adding configuration to samba..."
echo "[appdaemon]" | tee -a /etc/samba/smb.conf
echo "path = /home/homeassistant/appdaemon" | tee -a /etc/samba/smb.conf
echo "writeable = yes" | tee -a /etc/samba/smb.conf
echo "guest ok = yes" | tee -a /etc/samba/smb.conf
echo "create mask = 0644" | tee -a /etc/samba/smb.conf
echo "directory mask = 0755" | tee -a /etc/samba/smb.conf
echo "force user = homeassistant" | tee -a /etc/samba/smb.conf
echo "" | tee -a /etc/samba/smb.conf
echo "Restarting Samba service"
sudo systemctl restart smbd.service
fi
fi


echo
echo "Installation done."
echo
Expand Down

0 comments on commit 3898f9f

Please sign in to comment.