mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
5bc17cfbe1
git-svn-id: https://svn.fhem.de/fhem/trunk@15687 2b470e98-0d58-463d-a4d8-8e2adae1ed80
26 lines
505 B
Bash
26 lines
505 B
Bash
#!/bin/bash
|
|
# $Id$
|
|
|
|
set -e
|
|
#set -x
|
|
|
|
|
|
|
|
if ! getent passwd fhem >/dev/null; then
|
|
useradd --system --home /opt/fhem --gid dialout --shell /bin/false fhem
|
|
fi
|
|
|
|
chown -R fhem:dialout /opt/fhem
|
|
|
|
# remove repository entry after first installation
|
|
sed -i /debian.fhem.de/d /etc/apt/sources.list
|
|
|
|
# set up of autostart (Sysvinit upstart no longer supported)
|
|
ln -s /opt/fhem/contrib/init-scripts/fhem.service /etc/systemd/system/.
|
|
systemctl enable fhem
|
|
|
|
# and start the fhem service
|
|
systemctl start fhem
|
|
|
|
exit 0
|