mirror of
https://github.com/fhem/fhem-mirror.git
synced 2024-11-21 20:49:51 +00:00
FRITZ!Box image fixes (7390/7270)
git-svn-id: https://svn.fhem.de/fhem/trunk@3941 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
053b5689a1
commit
e9fc3cfdb5
@ -1,5 +1,5 @@
|
||||
VERS=5.4
|
||||
DATE=2013-04-08
|
||||
VERS=5.5
|
||||
DATE=2013-09-22
|
||||
|
||||
RELATIVE_PATH=YES
|
||||
BINDIR=/opt/fhem
|
||||
@ -7,13 +7,7 @@ MODDIR=$(BINDIR)
|
||||
VARDIR=$(BINDIR)/log
|
||||
MANDIR=$(BINDIR)/docs
|
||||
ETCDIR=$(BINDIR)
|
||||
|
||||
# Old variant
|
||||
#BINDIR=/usr/bin
|
||||
#MODDIR=/usr/share/fhem
|
||||
#VARDIR=/var/log/fhem
|
||||
#MANDIR=/usr/share/man/man1
|
||||
#ETCDIR=/etc
|
||||
DEMODIR=$(BINDIR)
|
||||
|
||||
# Used for .deb package creation
|
||||
RBINDIR=$(ROOT)$(BINDIR)
|
||||
@ -21,9 +15,10 @@ RMODDIR=$(ROOT)$(MODDIR)
|
||||
RVARDIR=$(ROOT)$(VARDIR)
|
||||
RMANDIR=$(ROOT)$(MANDIR)
|
||||
RETCDIR=$(ROOT)$(ETCDIR)
|
||||
RDEMODIR=$(ROOT)$(DEMODIR)
|
||||
|
||||
# Destination Directories
|
||||
DEST=$(RETCDIR) $(RBINDIR) $(RMODDIR) $(RMANDIR) $(RVARDIR)
|
||||
DEST=$(RETCDIR) $(RBINDIR) $(RMODDIR) $(RMANDIR) $(RVARDIR) $(RDEMODIR)
|
||||
|
||||
DESTDIR=fhem-$(VERS)
|
||||
|
||||
@ -57,10 +52,12 @@ install:
|
||||
@rm fhem.cfg.install
|
||||
@cp fhem.pl $(RBINDIR)
|
||||
@cp -rp FHEM docs www contrib $(RMODDIR)
|
||||
@cp -rp README_DEMO.txt demolog fhem.cfg.demo $/RDEMODIR)
|
||||
@cp docs/fhem.man $(RMANDIR)/fhem.pl.1
|
||||
@gzip -f -9 $(RMANDIR)/fhem.pl.1
|
||||
@echo "- cleanup: removing .svn leftovers"
|
||||
@find $(RMODDIR) -name .svn -print | xargs rm -rf
|
||||
@find $(RMODDIR) -name svn-commit\* -print | xargs rm -rf
|
||||
@echo
|
||||
@echo "Installation of fhem completed!"
|
||||
@echo
|
||||
@ -73,7 +70,8 @@ backup:
|
||||
@echo "Saving fhem to the .backup directory in the current directory"
|
||||
@-if [ ! -e .backup ]; then mkdir .backup; fi;
|
||||
@tar czf .backup/fhem-backup_`date +%y%m%d%H%M`.tar.gz \
|
||||
$(RETCDIR)/fhem* $(RBINDIR)/fhem* $(RDOCDIR) $(RMODDIR) $(RMANDIR)/fhem* $(RVARDIR)
|
||||
$(RETCDIR)/fhem* $(RBINDIR)/fhem* $(RDOCDIR)\
|
||||
$(RMODDIR) $(RMANDIR)/fhem* $(RVARDIR)
|
||||
|
||||
uninstall:backup
|
||||
@echo
|
||||
@ -89,18 +87,20 @@ uninstall:backup
|
||||
dist:
|
||||
mkdir .f
|
||||
cp -r fhem.pl fhem.cfg CHANGED HISTORY Makefile README.SVN\
|
||||
demolog fhem.cfg.demo README_DEMO.txt\
|
||||
FHEM contrib docs www webfrontend .f
|
||||
mkdir .f/log
|
||||
touch .f/log/empty_file.txt
|
||||
(cd .f; perl contrib/commandref_join.pl)
|
||||
find .f -name .svn -print | xargs rm -rf
|
||||
find .f -name svn-commit\* -print | xargs rm -rf
|
||||
find .f -name \*.orig -print | xargs rm -f
|
||||
find .f -name .#\* -print | xargs rm -f
|
||||
find .f -type f -print | grep -v Makefile | grep -v SWAP |\
|
||||
xargs perl -pi -e 's/=VERS=/$(VERS)/g;s/=DATE=/$(DATE)/g'
|
||||
rm -rf .f/www/SVGcache
|
||||
mv .f $(DESTDIR)
|
||||
tar cf - $(DESTDIR) | gzip > $(DESTDIR).tar.gz
|
||||
mv $(DESTDIR)/docs/*.html .
|
||||
rm -rf $(DESTDIR)
|
||||
|
||||
dist-clean:
|
||||
|
@ -6,6 +6,8 @@ HOWTO:
|
||||
Start FHEM with a demo configuration with
|
||||
perl fhem.pl fhem.cfg.demo
|
||||
(typed in a terminal) and point your browser to http://YourFhemHost:8083
|
||||
Use the startfhemDemo skript on the FritzBox.
|
||||
|
||||
|
||||
Stopping:
|
||||
- type shutdown in the browser command window, followed by RETURN
|
||||
|
@ -18,13 +18,14 @@ tar zxf ../../$fw.tar.gz
|
||||
|
||||
cd $fw
|
||||
cp -rp fhem.pl fhem.cfg FHEM docs www ../fhem
|
||||
cp -rp README_DEMO.txt fhem.cfg.demo demolog ../fhem
|
||||
rm -rf ../fhem/www/frontend
|
||||
cd ..
|
||||
rm -rf $fw
|
||||
|
||||
rm -rf fhem/docs/*.{odg,pdf,man,txt}
|
||||
cp fhemcmd.sh fhem/FHEM
|
||||
cp backup.sh startfhem fhem
|
||||
cp backup.sh startfhem* fhem
|
||||
|
||||
echo Packing again
|
||||
zip -qr $fw-fb7270.zip fhem
|
||||
|
16
fhem/contrib/FB7270/startfhemDemo
Executable file
16
fhem/contrib/FB7270/startfhemDemo
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# On the Fritzbox 7270 V1/V2 with missing df replace home with the hardcoded
|
||||
# path.
|
||||
root=`df | sed -n -e '/ftp\//s/.*ftp\///p'`
|
||||
home=/var/InternerSpeicher/$root/fhem
|
||||
|
||||
cd $home
|
||||
|
||||
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
|
||||
|
||||
perl fhem.pl fhem.cfg.demo
|
@ -1,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# optional backup command to speed up backup on th FB by omitting the backup of
|
||||
# the perl directory. To use it set attr global backupcmd backup.sh
|
||||
|
||||
tar cf - FHEM fhem.cfg fhem.pl log startfhem* www |
|
||||
gzip -3 > backup/backup-`date -I`.tar.gz
|
||||
echo backup done
|
||||
|
@ -12,12 +12,12 @@ echo Extracting the fritzbox template
|
||||
tar xf ../../priv/fritzbox7390_template.tar
|
||||
cd var
|
||||
tar zxf fhem.tar.gz
|
||||
rm -rf fhem/FHEM www docs
|
||||
rm -rf fhem/FHEM fhem/www fhem/docs
|
||||
mkdir fhem/FHEM fhem/docs
|
||||
cd ..
|
||||
|
||||
cp install var
|
||||
cp backup.sh startfhem startfhemAsRoot var/fhem
|
||||
cp backup.sh startfhem* var/fhem
|
||||
cp fhemcmd.sh var/fhem/FHEM
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@ cp fhem.cfg fhem.pl ../var/fhem
|
||||
cp -rp FHEM/* ../var/fhem/FHEM
|
||||
cp docs/*.html docs/*.jpg ../var/fhem/docs
|
||||
cp -rp www ../var/fhem
|
||||
cp -rp README_DEMO.txt fhem.cfg.demo demolog ../var/fhem
|
||||
rm -rf ../var/fhem/www/frontend
|
||||
|
||||
cd ..
|
||||
@ -37,10 +38,10 @@ rm -rf $fw
|
||||
|
||||
echo Packing again
|
||||
cd var
|
||||
cat >> fhem/fhem.cfg << EOF
|
||||
attr global backupcmd backup.sh
|
||||
EOF
|
||||
tar zcf fhem.tar.gz fhem
|
||||
#cat >> fhem/fhem.cfg << EOF
|
||||
#attr global backupcmd backup.sh
|
||||
#EOF
|
||||
tar cf - fhem | gzip -9 > fhem.tar.gz
|
||||
rm -rf fhem
|
||||
|
||||
cd ..
|
||||
|
13
fhem/contrib/FB7390/startfhemDemo
Executable file
13
fhem/contrib/FB7390/startfhemDemo
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
home=/var/InternerSpeicher/fhem
|
||||
|
||||
cd $home
|
||||
|
||||
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
|
||||
|
||||
perl fhem.pl fhem.cfg.demo
|
Loading…
Reference in New Issue
Block a user