diff --git a/mqtt-map/Properties/AssemblyInfo.cs b/mqtt-map/Properties/AssemblyInfo.cs index 6916952..500ec49 100644 --- a/mqtt-map/Properties/AssemblyInfo.cs +++ b/mqtt-map/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("mqtt-map")] -[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyCopyright("Copyright © 2018 - 06.03.2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,8 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0.0")] -[assembly: AssemblyFileVersion("1.1.0.0")] +[assembly: AssemblyVersion("1.1.1")] +[assembly: AssemblyFileVersion("1.1.1")] +/* + * 1.1.1 Add Debian package config + */ \ No newline at end of file diff --git a/mqtt-map/dpkg/control b/mqtt-map/dpkg/control new file mode 100644 index 0000000..5dd85f5 --- /dev/null +++ b/mqtt-map/dpkg/control @@ -0,0 +1,9 @@ +Package: loramap +Version: x.x-x +Section: base +Priority: optional +Architecture: any +Depends: mono-runtime (>= 5.18), libmono-posix4.0-cil (>= 5.18) +Maintainer: BlubbFish +Description: Lora-Map + Lora-Map shows a Map to control the Lora Tracker diff --git a/mqtt-map/dpkg/create-Builds.bat b/mqtt-map/dpkg/create-Builds.bat new file mode 100644 index 0000000..d28e857 --- /dev/null +++ b/mqtt-map/dpkg/create-Builds.bat @@ -0,0 +1,2 @@ +bash.exe -c "./make-deb.sh armhf" +pause \ No newline at end of file diff --git a/mqtt-map/dpkg/loramap-logrotate b/mqtt-map/dpkg/loramap-logrotate new file mode 100644 index 0000000..ac3be19 --- /dev/null +++ b/mqtt-map/dpkg/loramap-logrotate @@ -0,0 +1,10 @@ +/var/log/loramap.log { + compress + copytruncate + daily + delaycompress + missingok + notifempty + rotate 4 + size=10M +} \ No newline at end of file diff --git a/mqtt-map/dpkg/loramap.service b/mqtt-map/dpkg/loramap.service new file mode 100644 index 0000000..ea7c6ea --- /dev/null +++ b/mqtt-map/dpkg/loramap.service @@ -0,0 +1,20 @@ +# If you modify this, please also make sure to edit init.sh + +[Unit] +Description=Lora-Map +After=network-online.target + +[Service] +User=root +Group=root +WorkingDirectory=/usr/local/bin/loramap +ExecStart=/usr/bin/mono /usr/local/bin/loramap/Lora-Map.exe +KillMode=control-group +TimeoutStopSec=5 +Restart=on-failure +StandardOutput=null +StandardError=syslog + +[Install] +WantedBy=multi-user.target +Alias=lorabot.service diff --git a/mqtt-map/dpkg/make-deb.sh b/mqtt-map/dpkg/make-deb.sh new file mode 100644 index 0000000..2fb8e82 --- /dev/null +++ b/mqtt-map/dpkg/make-deb.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +HOMEDIR=$HOME +ROOT="$HOMEDIR/deb" +OUTPUT="../bin/Release" + +EXEC="$ROOT/usr/local/bin/loramap" +CONFIG="$ROOT/etc/loramap" +SYSTEMD="$ROOT/lib/systemd/system" +LOGROTATE="$ROOT/etc/logrotate.d" + +DEBIAN="$ROOT/DEBIAN" +VMAJOR=$(grep -e "^\[assembly: AssemblyVersion(\"" ../Properties/AssemblyInfo.cs | cut -d'"' -f 2 | cut -d'.' -f 1) +VMINOR=$(grep -e "^\[assembly: AssemblyVersion(\"" ../Properties/AssemblyInfo.cs | cut -d'"' -f 2 | cut -d'.' -f 2) +VBUILD=$(grep -e "^\[assembly: AssemblyVersion(\"" ../Properties/AssemblyInfo.cs | cut -d'"' -f 2 | cut -d'.' -f 3) +ARCHT=$1 + +mkdir -p $EXEC +mkdir -p $CONFIG +mkdir -p $DEBIAN +mkdir -p $SYSTEMD +mkdir -p $LOGROTATE + +cp control $DEBIAN +cp preinst $DEBIAN +cp postinst $DEBIAN +cp prerm $DEBIAN +sed -i s/Version:\ x\.x-x/"Version: $VMAJOR.$VMINOR-$VBUILD"/ $DEBIAN/control +sed -i s/Architecture:\ any/"Architecture: $ARCHT"/ $DEBIAN/control +chmod 755 $DEBIAN -R + +cp loramap.service $SYSTEMD +chmod 644 $SYSTEMD/loramap.service + +cp $OUTPUT/*.exe $EXEC/ +#cp $OUTPUT/gpio.2.44 $EXEC/ +#cp $OUTPUT/libwiringPi.so.2.44 $EXEC/ +find $OUTPUT -name \*.dll -exec cp {} $EXEC/ \; +chmod 644 $EXEC/* +chmod 755 $EXEC + +cp $OUTPUT/config-example/* $CONFIG +chmod 644 $CONFIG/* +chmod 755 $CONFIG + +cp loramap-logrotate $LOGROTATE/loramap +chmod 644 $LOGROTATE/* + +dpkg-deb --build $ROOT +mv $HOMEDIR/deb.deb ../../../Builds/"$ARCHT-loramap_$VMAJOR.$VMINOR-$VBUILD.deb" +rm $HOMEDIR/deb -r \ No newline at end of file diff --git a/mqtt-map/dpkg/postinst b/mqtt-map/dpkg/postinst new file mode 100644 index 0000000..27417e8 --- /dev/null +++ b/mqtt-map/dpkg/postinst @@ -0,0 +1,9 @@ +#!/bin/bash + +systemctl enable loramap +systemctl daemon-reload + +if [ -f /tmp/loramap_service_runner ]; then + service loramap start + rm /tmp/loramap_service_runner +fi \ No newline at end of file diff --git a/mqtt-map/dpkg/preinst b/mqtt-map/dpkg/preinst new file mode 100644 index 0000000..05a7907 --- /dev/null +++ b/mqtt-map/dpkg/preinst @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/mqtt-map/dpkg/prerm b/mqtt-map/dpkg/prerm new file mode 100644 index 0000000..77d10d3 --- /dev/null +++ b/mqtt-map/dpkg/prerm @@ -0,0 +1,7 @@ +#!/bin/bash + +if [[ $(systemctl is-active loramap || true) == "active" ]] +then + touch /tmp/loramap_service_runner + service loramap stop +fi \ No newline at end of file diff --git a/mqtt-map/resources/css/global.css b/mqtt-map/resources/css/global.css index 71de8c7..c1e626d 100644 --- a/mqtt-map/resources/css/global.css +++ b/mqtt-map/resources/css/global.css @@ -11,10 +11,17 @@ html, body { padding: 0; } -#title { +#menucollumn { + width: 32px; + background-color: white; position: absolute; - z-index: 10000; - margin-left: 110px; - margin-top: 7px; - color: #e23232; + top: 10px; + bottom: 10px; + left: 10px; } + +#menucollumn .pos { + display: block; + height: 32px; + width: 32px; +} \ No newline at end of file diff --git a/mqtt-map/resources/index.html b/mqtt-map/resources/index.html index af1df98..0e15128 100644 --- a/mqtt-map/resources/index.html +++ b/mqtt-map/resources/index.html @@ -8,8 +8,10 @@ -

Mqtt-Map Monica

+