mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 07:19:24 +00:00
670c7b5e2f
git-svn-id: https://svn.fhem.de/fhem/trunk@1182 2b470e98-0d58-463d-a4d8-8e2adae1ed80
35 lines
800 B
Bash
Executable File
35 lines
800 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
|
|
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
|
|
|
|
# set file ownership
|
|
chown -R boxusr80 ${home}/log
|
|
chown -R boxusr80 ${home}/FHEM
|
|
|
|
chown root ${home}/dfu-programmer
|
|
chmod 4755 ${home}/dfu-programmer
|
|
fi
|
|
|
|
perl fhem.pl fhem.cfg
|