From: Michael J.M. Wagner Date: Tue, 17 Oct 2023 18:41:18 +0000 (+0200) Subject: posaune X-Git-Tag: v_0.0-7~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2e6bf55fa5823071406666b27bfc787293e5bcce;p=projects.git posaune --- diff --git a/Test/xFhem/.dummy b/Test/xFhem/.dummy new file mode 100644 index 0000000..e69de29 diff --git a/Test/xFhem/FitnessePages/.dummy b/Test/xFhem/FitnessePages/.dummy new file mode 100644 index 0000000..e69de29 diff --git a/Test/xFhem/FitnessePages/AaaPrepare/.dummy b/Test/xFhem/FitnessePages/AaaPrepare/.dummy new file mode 100644 index 0000000..e69de29 diff --git a/Test/xFhem/FitnessePages/AaaPrepare/content.txt b/Test/xFhem/FitnessePages/AaaPrepare/content.txt new file mode 100644 index 0000000..b75ee2f --- /dev/null +++ b/Test/xFhem/FitnessePages/AaaPrepare/content.txt @@ -0,0 +1,8 @@ +Sysal-Stub installieren + +!|test.util.CallScript| +|call script|sudo bin/install-sysal-stub| + +Anmerkung: Falls eine komplett neue Installation des sysal-stub erzwungen werden soll: +sudo rm /etc/apache2/sites-available/sysal_stub.conf +ausführen. diff --git a/Test/xFhem/FitnessePages/AaaPrepare/properties.xml b/Test/xFhem/FitnessePages/AaaPrepare/properties.xml new file mode 100644 index 0000000..3e87512 --- /dev/null +++ b/Test/xFhem/FitnessePages/AaaPrepare/properties.xml @@ -0,0 +1,12 @@ + + + true + true + true + true + true + true + + true + true + diff --git a/Test/xFhem/FitnessePages/TestWatchdog/.dummy b/Test/xFhem/FitnessePages/TestWatchdog/.dummy new file mode 100644 index 0000000..e69de29 diff --git a/Test/xFhem/FitnessePages/TestWatchdog/content.txt b/Test/xFhem/FitnessePages/TestWatchdog/content.txt new file mode 100644 index 0000000..8b3a0b9 --- /dev/null +++ b/Test/xFhem/FitnessePages/TestWatchdog/content.txt @@ -0,0 +1,20 @@ +Install Watchdog + +!|test.util.CallScript| +|call script|xfhem define watchdog localhost| + +Entferne Sysal-Stub-Output +|call script|!-sudo rm /var/test/sysal-stub.out || true -!| + +Verkürze Zeit +|call script|/opt/fhem/fhem.pl 7072 "modify watchdog +*00:00:05"| + +Warte Auslösezeit +|call script|sleep 6| + +Prüfe Watchdog +|call script|grep rwd /var/test/sysal-stub.out| + +Entferne Watchdog +|call script|xfhem delete watchdog| + diff --git a/Test/xFhem/FitnessePages/TestWatchdog/properties.xml b/Test/xFhem/FitnessePages/TestWatchdog/properties.xml new file mode 100644 index 0000000..e13fdf4 --- /dev/null +++ b/Test/xFhem/FitnessePages/TestWatchdog/properties.xml @@ -0,0 +1,12 @@ + + + true + true + true + true + true + true + true + true + true + diff --git a/Test/xFhem/FitnessePages/content.txt b/Test/xFhem/FitnessePages/content.txt new file mode 100644 index 0000000..5f3d863 --- /dev/null +++ b/Test/xFhem/FitnessePages/content.txt @@ -0,0 +1,2 @@ +#!contents -R2 -g -p -f -h +!contents diff --git a/Test/xFhem/FitnessePages/properties.xml b/Test/xFhem/FitnessePages/properties.xml new file mode 100644 index 0000000..3096ff6 --- /dev/null +++ b/Test/xFhem/FitnessePages/properties.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Test/xFhem/bin/.dummy b/Test/xFhem/bin/.dummy new file mode 100644 index 0000000..e69de29 diff --git a/Test/xFhem/bin/install-sysal-stub b/Test/xFhem/bin/install-sysal-stub new file mode 100755 index 0000000..0121c38 --- /dev/null +++ b/Test/xFhem/bin/install-sysal-stub @@ -0,0 +1,27 @@ +#!/bin/bash +set -e + +# test if apache-conf already installed +if [ -e /etc/apache2/sites-enabled/sysal_stub.conf ] +then + exit +fi + +mkdir -p /var/test +chmod 777 /var/test + +cwd=$(pwd) +# write apache conf +echo "# Apache conf for sysal stub +Alias /sysal/rest/AlarmInterface/RemoteWatchdog $cwd/bin/sysal-stub.pl + + Require all granted + Options +ExecCGI + AddHandler cgi-script .pl + +" > /etc/apache2/sites-available/sysal_stub.conf +a2ensite sysal_stub +a2enmod cgi + +systemctl restart apache2 + diff --git a/Test/xFhem/bin/sysal-stub.pl b/Test/xFhem/bin/sysal-stub.pl new file mode 100755 index 0000000..03f6b95 --- /dev/null +++ b/Test/xFhem/bin/sysal-stub.pl @@ -0,0 +1,14 @@ +#!/usr/bin/perl -w + +print "Content-type: text/html\n\n"; +print "\n"; + + +open (OUT, ">/var/test/sysal-stub.out"); +while (my $line = ) { + print OUT "$line\n"; + print "$line\n"; +} + +print "\n"; + diff --git a/TestXfhem/.dummy b/TestXfhem/.dummy deleted file mode 100644 index e69de29..0000000 diff --git a/TestXfhem/FitnessePages/.dummy b/TestXfhem/FitnessePages/.dummy deleted file mode 100644 index e69de29..0000000 diff --git a/TestXfhem/FitnessePages/AaaPrepare/.dummy b/TestXfhem/FitnessePages/AaaPrepare/.dummy deleted file mode 100644 index e69de29..0000000 diff --git a/TestXfhem/FitnessePages/AaaPrepare/content.txt b/TestXfhem/FitnessePages/AaaPrepare/content.txt deleted file mode 100644 index b75ee2f..0000000 --- a/TestXfhem/FitnessePages/AaaPrepare/content.txt +++ /dev/null @@ -1,8 +0,0 @@ -Sysal-Stub installieren - -!|test.util.CallScript| -|call script|sudo bin/install-sysal-stub| - -Anmerkung: Falls eine komplett neue Installation des sysal-stub erzwungen werden soll: -sudo rm /etc/apache2/sites-available/sysal_stub.conf -ausführen. diff --git a/TestXfhem/FitnessePages/AaaPrepare/properties.xml b/TestXfhem/FitnessePages/AaaPrepare/properties.xml deleted file mode 100644 index 3e87512..0000000 --- a/TestXfhem/FitnessePages/AaaPrepare/properties.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - true - true - true - true - true - true - - true - true - diff --git a/TestXfhem/FitnessePages/TestWatchdog/.dummy b/TestXfhem/FitnessePages/TestWatchdog/.dummy deleted file mode 100644 index e69de29..0000000 diff --git a/TestXfhem/FitnessePages/TestWatchdog/content.txt b/TestXfhem/FitnessePages/TestWatchdog/content.txt deleted file mode 100644 index 8b3a0b9..0000000 --- a/TestXfhem/FitnessePages/TestWatchdog/content.txt +++ /dev/null @@ -1,20 +0,0 @@ -Install Watchdog - -!|test.util.CallScript| -|call script|xfhem define watchdog localhost| - -Entferne Sysal-Stub-Output -|call script|!-sudo rm /var/test/sysal-stub.out || true -!| - -Verkürze Zeit -|call script|/opt/fhem/fhem.pl 7072 "modify watchdog +*00:00:05"| - -Warte Auslösezeit -|call script|sleep 6| - -Prüfe Watchdog -|call script|grep rwd /var/test/sysal-stub.out| - -Entferne Watchdog -|call script|xfhem delete watchdog| - diff --git a/TestXfhem/FitnessePages/TestWatchdog/properties.xml b/TestXfhem/FitnessePages/TestWatchdog/properties.xml deleted file mode 100644 index e13fdf4..0000000 --- a/TestXfhem/FitnessePages/TestWatchdog/properties.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - true - true - true - true - true - true - true - true - true - diff --git a/TestXfhem/FitnessePages/content.txt b/TestXfhem/FitnessePages/content.txt deleted file mode 100644 index 5f3d863..0000000 --- a/TestXfhem/FitnessePages/content.txt +++ /dev/null @@ -1,2 +0,0 @@ -#!contents -R2 -g -p -f -h -!contents diff --git a/TestXfhem/FitnessePages/properties.xml b/TestXfhem/FitnessePages/properties.xml deleted file mode 100644 index 3096ff6..0000000 --- a/TestXfhem/FitnessePages/properties.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/TestXfhem/bin/.dummy b/TestXfhem/bin/.dummy deleted file mode 100644 index e69de29..0000000 diff --git a/TestXfhem/bin/install-sysal-stub b/TestXfhem/bin/install-sysal-stub deleted file mode 100755 index 0121c38..0000000 --- a/TestXfhem/bin/install-sysal-stub +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -set -e - -# test if apache-conf already installed -if [ -e /etc/apache2/sites-enabled/sysal_stub.conf ] -then - exit -fi - -mkdir -p /var/test -chmod 777 /var/test - -cwd=$(pwd) -# write apache conf -echo "# Apache conf for sysal stub -Alias /sysal/rest/AlarmInterface/RemoteWatchdog $cwd/bin/sysal-stub.pl - - Require all granted - Options +ExecCGI - AddHandler cgi-script .pl - -" > /etc/apache2/sites-available/sysal_stub.conf -a2ensite sysal_stub -a2enmod cgi - -systemctl restart apache2 - diff --git a/TestXfhem/bin/sysal-stub.pl b/TestXfhem/bin/sysal-stub.pl deleted file mode 100755 index 03f6b95..0000000 --- a/TestXfhem/bin/sysal-stub.pl +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/perl -w - -print "Content-type: text/html\n\n"; -print "\n"; - - -open (OUT, ">/var/test/sysal-stub.out"); -while (my $line = ) { - print OUT "$line\n"; - print "$line\n"; -} - -print "\n"; - diff --git a/debian/timetracker.cp b/debian/timetracker.cp index 760300c..b577aa2 100755 --- a/debian/timetracker.cp +++ b/debian/timetracker.cp @@ -5,7 +5,7 @@ mkdir -p $1/usr/share/php/timetracker rsync -a --delete --exclude='.git' Downloads/timetracker/ $1/usr/share/php/timetracker/ mkdir -p $1/etc/apache2/sites-available -cp debian/timetracker.conf $1/etc/apache2/sites-available/ +cp timetracker/timetracker.conf $1/etc/apache2/sites-available/ mkdir -p $1/usr/share/doc/timetracker cp Downloads/timetracker/license.txt $1/usr/share/doc/timetracker/copyright diff --git a/debian/timetracker.prepare b/debian/timetracker.prepare index 7d9ccbc..e034513 100755 --- a/debian/timetracker.prepare +++ b/debian/timetracker.prepare @@ -7,7 +7,7 @@ cd Downloads if [ -d timetracker ] then cd timetracker - git fetch -t + git pull origin $(git rev-parse --abbrev-ref HEAD) else git clone https://github.com/anuko/timetracker cd timetracker @@ -16,5 +16,6 @@ fi # determine version version=$(grep "APP_VERSION" initialize.php |sed 's/define("APP_VERSION", "//' |sed 's/".*//') echo $version -echo "version=$version" >> ../../debian/setenv.sh +echo "export version=$version" >> ../../debian/setenv.sh +echo "version=$version" >> ../../debian/rules.pre