mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-12 20:02:00 +00:00
20 lines
386 B
Plaintext
20 lines
386 B
Plaintext
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if ! getent passwd fhem >/dev/null; then
|
|
useradd --system --home /opt/fhem --gid dialout --shell /bin/false fhem
|
|
fi
|
|
|
|
chown -R fhem /opt/fhem
|
|
|
|
# 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
|
|
invoke-rc.d fhem start
|