2016-04-11 06:29:41 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2017-01-30 19:52:22 +00:00
|
|
|
on_chroot << EOF
|
|
|
|
groupadd -f -r -g 1001 homeassistant
|
|
|
|
useradd -u 1001 -g 1001 -rm homeassistant
|
|
|
|
EOF
|
|
|
|
|
|
|
|
install -v -o 1001 -g 1001 -d ${ROOTFS_DIR}/srv/homeassistant
|
2017-02-25 19:29:45 +00:00
|
|
|
wget -O files/hassbian-scripts-0.2.deb https://github.com/home-assistant/hassbian-scripts/releases/download/v0.2/hassbian-scripts-0.2.deb
|
2017-01-30 19:52:22 +00:00
|
|
|
|
|
|
|
on_chroot << EOF
|
2017-02-25 19:29:45 +00:00
|
|
|
dpkg -i files/hassbian-scripts-0.2.deb
|
2017-01-30 19:52:22 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
on_chroot << \EOF
|
|
|
|
for GRP in dialout gpio spi i2c video; do
|
|
|
|
adduser homeassistant $GRP
|
|
|
|
done
|
|
|
|
for GRP in homeassistant; do
|
|
|
|
adduser pi $GRP
|
|
|
|
done
|
|
|
|
EOF
|
|
|
|
|