2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-14 05:46:35 +00:00

Fritzbox: backup.sh added to initial image

git-svn-id: https://svn.fhem.de/fhem/trunk@3797 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-08-26 16:18:00 +00:00
parent 9e282ad29e
commit 5129bba363
4 changed files with 19 additions and 18 deletions

6
fhem/contrib/FB7270/backup.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
tar cf - FHEM fhem.cfg fhem.pl log startfhem* www |
gzip -3 > backup/backup-`date -I`.tar.gz
echo backup done
exit 0

View File

@ -18,19 +18,13 @@ tar zxf ../../$fw.tar.gz
cd $fw
cp -rp fhem.pl fhem.cfg FHEM docs www ../fhem
rm -rf ../fhem/www/frontend
cd ..
rm -rf $fw
rm -rf fhem/docs/*.{odg,pdf,man,txt}
cp fhemcmd.sh fhem/FHEM
cp startfhem fhem
cat >> fhem/fhem.cfg << 'EOF'
#attr WEB basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
#attr WEBphone basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
#attr WEBtablet basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
#attr telnetPort password {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
EOF
cp backup.sh startfhem fhem
echo Packing again
zip -qr $fw-fb7270.zip fhem

6
fhem/contrib/FB7390/backup.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
tar cf - FHEM fhem.cfg fhem.pl log startfhem* www |
gzip -3 > backup/backup-`date -I`.tar.gz
echo backup done
exit 0

View File

@ -17,7 +17,7 @@ mkdir fhem/FHEM fhem/docs
cd ..
cp install var
cp startfhem startfhemAsRoot var/fhem
cp backup.sh startfhem startfhemAsRoot var/fhem
cp fhemcmd.sh var/fhem/FHEM
@ -29,22 +29,17 @@ 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
rm -rf ../var/fhem/www/frontend
cd ..
rm -rf $fw
echo Packing again
cd var/fhem
cat >> fhem.cfg << 'EOF'
#FB_checkPw does not for FB-OS > 5.22
#attr WEB basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
#attr WEBphone basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
#attr WEBtablet basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
#attr telnetPort globalpassword {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
cd var
cat >> fhem/fhem.cfg << EOF
attr global backupcmd backup.sh
EOF
cd ..
tar zcf fhem.tar.gz fhem
rm -rf fhem