2014-10-10 15:52:47 +00:00
|
|
|
#!/bin/bash
|
2017-02-27 20:44:26 +00:00
|
|
|
# $Id$
|
2010-08-02 12:47:55 +00:00
|
|
|
|
2010-09-30 13:12:28 +00:00
|
|
|
set -e
|
2014-11-09 13:19:57 +00:00
|
|
|
#set -x
|
2010-08-02 12:47:55 +00:00
|
|
|
|
2017-02-27 20:44:26 +00:00
|
|
|
|
|
|
|
|
2010-09-30 13:12:28 +00:00
|
|
|
if ! getent passwd fhem >/dev/null; then
|
2012-12-29 07:57:52 +00:00
|
|
|
useradd --system --home /opt/fhem --gid dialout --shell /bin/false fhem
|
2010-08-02 12:47:55 +00:00
|
|
|
fi
|
2010-09-30 13:12:28 +00:00
|
|
|
|
2015-01-20 13:49:15 +00:00
|
|
|
chown -R fhem:dialout /opt/fhem
|
2010-09-30 13:12:28 +00:00
|
|
|
|
2017-02-27 20:44:26 +00:00
|
|
|
# remove repository entry after first installation
|
|
|
|
sed -i /debian.fhem.de/d /etc/apt/sources.list
|
|
|
|
|
2017-12-25 16:36:50 +00:00
|
|
|
# set up of autostart (Sysvinit upstart no longer supported)
|
|
|
|
ln -s /opt/fhem/contrib/init-scripts/fhem.service /etc/systemd/system/.
|
|
|
|
systemctl enable fhem
|
2014-09-22 11:58:11 +00:00
|
|
|
|
2017-12-25 16:36:50 +00:00
|
|
|
# and start the fhem service
|
|
|
|
systemctl start fhem
|
2014-10-10 15:52:47 +00:00
|
|
|
|
2014-11-09 13:19:57 +00:00
|
|
|
exit 0
|