2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00
fhem-mirror/fhem/contrib/FB7390/makeimage

54 lines
1.1 KiB
Plaintext
Raw Normal View History

#!/bin/sh
fw=$1
if test ! -f ../../$fw.tar.gz; then
echo "usage: makeimage <fhem-VERSION>"
echo "../../<fhem-VERSION>.tar.gz must exist"
exit 1
fi
rm -rf var
echo Extracting the fritzbox template
tar xf ../../priv/fritzbox7390_template.tar
cd var
tar zxf fhem.tar.gz
rm -rf fhem/FHEM www docs
mkdir fhem/FHEM fhem/docs
cd ..
cp install var
cp startfhem startfhemAsRoot var/fhem
cp fhemcmd.sh var/fhem/FHEM
echo Extracting $fw
rm -rf $fw
tar zxf ../../$fw.tar.gz
cd $fw
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
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") }
EOF
cd ..
tar zcf fhem.tar.gz fhem
rm -rf fhem
cd ..
tar cf $fw-fb7390.image var
rm -rf var