mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 01:09:47 +00:00
95bdae3afa
git-svn-id: https://svn.fhem.de/fhem/trunk@1261 2b470e98-0d58-463d-a4d8-8e2adae1ed80
38 lines
893 B
Bash
Executable File
38 lines
893 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
|
|
|
|
# let FHEM run as user boxusr80 by adding user fhem with uid of boxusr80
|
|
# Using this feature the following will not work: ping,WOL,lcd4linux
|
|
# start fhem-user
|
|
id fhem > /dev/null 2>&1
|
|
if [ "$?" -ne "0" ]; then
|
|
echo "user fhem does not exist. Adding it."
|
|
echo "fhem:any:1080:0:fhem:/home-not-used:/bin/sh" >>/var/tmp/passwd
|
|
fi
|
|
# end fhem-user
|
|
|
|
# set file ownership
|
|
chown -R boxusr80 ${home}/log
|
|
chown -R boxusr80 ${home}/FHEM
|
|
|
|
chown root ${home}/dfu-programmer
|
|
chmod 4755 ${home}/dfu-programmer
|
|
|
|
perl fhem.pl fhem.cfg
|