mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 07:19:24 +00:00
797cf4294f
git-svn-id: https://svn.fhem.de/fhem/trunk@13542 2b470e98-0d58-463d-a4d8-8e2adae1ed80
30 lines
571 B
Bash
30 lines
571 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
|
|
|
|
#mkdir -p /etc/init.d
|
|
cp /opt/fhem/contrib/init-scripts/fhem.3 /etc/init.d/fhem
|
|
chmod ugo+x /etc/init.d/fhem
|
|
update-rc.d fhem defaults
|
|
|
|
if test -f /etc/init.d/fhem; then
|
|
/etc/init.d/fhem start noaptmark
|
|
fi
|
|
exit 0
|