mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
cca31f1d7e
git-svn-id: https://svn.fhem.de/fhem/trunk@2390 2b470e98-0d58-463d-a4d8-8e2adae1ed80
40 lines
939 B
Bash
Executable File
40 lines
939 B
Bash
Executable File
#!/bin/sh
|
|
|
|
home=/var/InternerSpeicher/fhem
|
|
|
|
cd $home
|
|
|
|
trap "" SIGHUP
|
|
modprobe cdc_acm
|
|
modprobe ftdi_sio
|
|
sleep 2
|
|
|
|
ln -sf $home/FHEM/fhemcmd.sh /var/fhemcmd
|
|
|
|
PATH=$home:$PATH
|
|
export PATH
|
|
|
|
export LD_LIBRARY_PATH=$home/lib
|
|
export PERL5LIB=$home/lib/perl5/site_perl/5.12.2/mips-linux:$home/lib/perl5/site_perl/5.12.2:$home/lib/perl5/5.12.2/mips-linux:$home/lib/perl5/5.12.2
|
|
|
|
# add user fhem with uid of boxusr80/boxusr99 (== ftpuser)
|
|
# Comment/delete everything between START and END to run FHEM as root
|
|
|
|
## START:fhem-user
|
|
id fhem > /dev/null 2>&1
|
|
if test "$?" -ne "0"; then
|
|
grep -q 1099 /etc/passwd;
|
|
if test $? -eq "0"; then
|
|
echo "fhem:any:1099:0:fhem:/home-not-used:/bin/sh" >>/var/tmp/passwd
|
|
else
|
|
echo "fhem:any:1080:0:fhem:/home-not-used:/bin/sh" >>/var/tmp/passwd
|
|
fi
|
|
chown -R fhem FHEM docs log www
|
|
chown fhem . *
|
|
chown root dfu-programmer
|
|
chmod u+s dfu-programmer
|
|
fi
|
|
## END:fhem-user
|
|
|
|
perl fhem.pl fhem.cfg
|