mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-27 10:37:13 +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
|
VERS=5.5
|
||||||
DATE=2013-04-08
|
DATE=2013-09-22
|
||||||
|
|
||||||
RELATIVE_PATH=YES
|
RELATIVE_PATH=YES
|
||||||
BINDIR=/opt/fhem
|
BINDIR=/opt/fhem
|
||||||
@ -7,13 +7,7 @@ MODDIR=$(BINDIR)
|
|||||||
VARDIR=$(BINDIR)/log
|
VARDIR=$(BINDIR)/log
|
||||||
MANDIR=$(BINDIR)/docs
|
MANDIR=$(BINDIR)/docs
|
||||||
ETCDIR=$(BINDIR)
|
ETCDIR=$(BINDIR)
|
||||||
|
DEMODIR=$(BINDIR)
|
||||||
# Old variant
|
|
||||||
#BINDIR=/usr/bin
|
|
||||||
#MODDIR=/usr/share/fhem
|
|
||||||
#VARDIR=/var/log/fhem
|
|
||||||
#MANDIR=/usr/share/man/man1
|
|
||||||
#ETCDIR=/etc
|
|
||||||
|
|
||||||
# Used for .deb package creation
|
# Used for .deb package creation
|
||||||
RBINDIR=$(ROOT)$(BINDIR)
|
RBINDIR=$(ROOT)$(BINDIR)
|
||||||
@ -21,9 +15,10 @@ RMODDIR=$(ROOT)$(MODDIR)
|
|||||||
RVARDIR=$(ROOT)$(VARDIR)
|
RVARDIR=$(ROOT)$(VARDIR)
|
||||||
RMANDIR=$(ROOT)$(MANDIR)
|
RMANDIR=$(ROOT)$(MANDIR)
|
||||||
RETCDIR=$(ROOT)$(ETCDIR)
|
RETCDIR=$(ROOT)$(ETCDIR)
|
||||||
|
RDEMODIR=$(ROOT)$(DEMODIR)
|
||||||
|
|
||||||
# Destination Directories
|
# Destination Directories
|
||||||
DEST=$(RETCDIR) $(RBINDIR) $(RMODDIR) $(RMANDIR) $(RVARDIR)
|
DEST=$(RETCDIR) $(RBINDIR) $(RMODDIR) $(RMANDIR) $(RVARDIR) $(RDEMODIR)
|
||||||
|
|
||||||
DESTDIR=fhem-$(VERS)
|
DESTDIR=fhem-$(VERS)
|
||||||
|
|
||||||
@ -57,10 +52,12 @@ install:
|
|||||||
@rm fhem.cfg.install
|
@rm fhem.cfg.install
|
||||||
@cp fhem.pl $(RBINDIR)
|
@cp fhem.pl $(RBINDIR)
|
||||||
@cp -rp FHEM docs www contrib $(RMODDIR)
|
@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
|
@cp docs/fhem.man $(RMANDIR)/fhem.pl.1
|
||||||
@gzip -f -9 $(RMANDIR)/fhem.pl.1
|
@gzip -f -9 $(RMANDIR)/fhem.pl.1
|
||||||
@echo "- cleanup: removing .svn leftovers"
|
@echo "- cleanup: removing .svn leftovers"
|
||||||
@find $(RMODDIR) -name .svn -print | xargs rm -rf
|
@find $(RMODDIR) -name .svn -print | xargs rm -rf
|
||||||
|
@find $(RMODDIR) -name svn-commit\* -print | xargs rm -rf
|
||||||
@echo
|
@echo
|
||||||
@echo "Installation of fhem completed!"
|
@echo "Installation of fhem completed!"
|
||||||
@echo
|
@echo
|
||||||
@ -73,7 +70,8 @@ backup:
|
|||||||
@echo "Saving fhem to the .backup directory in the current directory"
|
@echo "Saving fhem to the .backup directory in the current directory"
|
||||||
@-if [ ! -e .backup ]; then mkdir .backup; fi;
|
@-if [ ! -e .backup ]; then mkdir .backup; fi;
|
||||||
@tar czf .backup/fhem-backup_`date +%y%m%d%H%M`.tar.gz \
|
@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
|
uninstall:backup
|
||||||
@echo
|
@echo
|
||||||
@ -89,18 +87,20 @@ uninstall:backup
|
|||||||
dist:
|
dist:
|
||||||
mkdir .f
|
mkdir .f
|
||||||
cp -r fhem.pl fhem.cfg CHANGED HISTORY Makefile README.SVN\
|
cp -r fhem.pl fhem.cfg CHANGED HISTORY Makefile README.SVN\
|
||||||
|
demolog fhem.cfg.demo README_DEMO.txt\
|
||||||
FHEM contrib docs www webfrontend .f
|
FHEM contrib docs www webfrontend .f
|
||||||
mkdir .f/log
|
mkdir .f/log
|
||||||
touch .f/log/empty_file.txt
|
touch .f/log/empty_file.txt
|
||||||
(cd .f; perl contrib/commandref_join.pl)
|
(cd .f; perl contrib/commandref_join.pl)
|
||||||
find .f -name .svn -print | xargs rm -rf
|
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 \*.orig -print | xargs rm -f
|
||||||
find .f -name .#\* -print | xargs rm -f
|
find .f -name .#\* -print | xargs rm -f
|
||||||
find .f -type f -print | grep -v Makefile | grep -v SWAP |\
|
find .f -type f -print | grep -v Makefile | grep -v SWAP |\
|
||||||
xargs perl -pi -e 's/=VERS=/$(VERS)/g;s/=DATE=/$(DATE)/g'
|
xargs perl -pi -e 's/=VERS=/$(VERS)/g;s/=DATE=/$(DATE)/g'
|
||||||
|
rm -rf .f/www/SVGcache
|
||||||
mv .f $(DESTDIR)
|
mv .f $(DESTDIR)
|
||||||
tar cf - $(DESTDIR) | gzip > $(DESTDIR).tar.gz
|
tar cf - $(DESTDIR) | gzip > $(DESTDIR).tar.gz
|
||||||
mv $(DESTDIR)/docs/*.html .
|
|
||||||
rm -rf $(DESTDIR)
|
rm -rf $(DESTDIR)
|
||||||
|
|
||||||
dist-clean:
|
dist-clean:
|
||||||
|
@ -6,6 +6,8 @@ HOWTO:
|
|||||||
Start FHEM with a demo configuration with
|
Start FHEM with a demo configuration with
|
||||||
perl fhem.pl fhem.cfg.demo
|
perl fhem.pl fhem.cfg.demo
|
||||||
(typed in a terminal) and point your browser to http://YourFhemHost:8083
|
(typed in a terminal) and point your browser to http://YourFhemHost:8083
|
||||||
|
Use the startfhemDemo skript on the FritzBox.
|
||||||
|
|
||||||
|
|
||||||
Stopping:
|
Stopping:
|
||||||
- type shutdown in the browser command window, followed by RETURN
|
- type shutdown in the browser command window, followed by RETURN
|
||||||
|
@ -18,13 +18,14 @@ tar zxf ../../$fw.tar.gz
|
|||||||
|
|
||||||
cd $fw
|
cd $fw
|
||||||
cp -rp fhem.pl fhem.cfg FHEM docs www ../fhem
|
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
|
rm -rf ../fhem/www/frontend
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf $fw
|
rm -rf $fw
|
||||||
|
|
||||||
rm -rf fhem/docs/*.{odg,pdf,man,txt}
|
rm -rf fhem/docs/*.{odg,pdf,man,txt}
|
||||||
cp fhemcmd.sh fhem/FHEM
|
cp fhemcmd.sh fhem/FHEM
|
||||||
cp backup.sh startfhem fhem
|
cp backup.sh startfhem* fhem
|
||||||
|
|
||||||
echo Packing again
|
echo Packing again
|
||||||
zip -qr $fw-fb7270.zip fhem
|
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
|
#!/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 |
|
tar cf - FHEM fhem.cfg fhem.pl log startfhem* www |
|
||||||
gzip -3 > backup/backup-`date -I`.tar.gz
|
gzip -3 > backup/backup-`date -I`.tar.gz
|
||||||
echo backup done
|
echo backup done
|
||||||
|
@ -12,12 +12,12 @@ echo Extracting the fritzbox template
|
|||||||
tar xf ../../priv/fritzbox7390_template.tar
|
tar xf ../../priv/fritzbox7390_template.tar
|
||||||
cd var
|
cd var
|
||||||
tar zxf fhem.tar.gz
|
tar zxf fhem.tar.gz
|
||||||
rm -rf fhem/FHEM www docs
|
rm -rf fhem/FHEM fhem/www fhem/docs
|
||||||
mkdir fhem/FHEM fhem/docs
|
mkdir fhem/FHEM fhem/docs
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
cp install var
|
cp install var
|
||||||
cp backup.sh startfhem startfhemAsRoot var/fhem
|
cp backup.sh startfhem* var/fhem
|
||||||
cp fhemcmd.sh var/fhem/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 -rp FHEM/* ../var/fhem/FHEM
|
||||||
cp docs/*.html docs/*.jpg ../var/fhem/docs
|
cp docs/*.html docs/*.jpg ../var/fhem/docs
|
||||||
cp -rp www ../var/fhem
|
cp -rp www ../var/fhem
|
||||||
|
cp -rp README_DEMO.txt fhem.cfg.demo demolog ../var/fhem
|
||||||
rm -rf ../var/fhem/www/frontend
|
rm -rf ../var/fhem/www/frontend
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
@ -37,10 +38,10 @@ rm -rf $fw
|
|||||||
|
|
||||||
echo Packing again
|
echo Packing again
|
||||||
cd var
|
cd var
|
||||||
cat >> fhem/fhem.cfg << EOF
|
#cat >> fhem/fhem.cfg << EOF
|
||||||
attr global backupcmd backup.sh
|
#attr global backupcmd backup.sh
|
||||||
EOF
|
#EOF
|
||||||
tar zcf fhem.tar.gz fhem
|
tar cf - fhem | gzip -9 > fhem.tar.gz
|
||||||
rm -rf fhem
|
rm -rf fhem
|
||||||
|
|
||||||
cd ..
|
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…
x
Reference in New Issue
Block a user