2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

50_Signalbot: update contacts on startup, signal-cli 0.10.9 update

git-svn-id: https://svn.fhem.de/fhem/trunk@26260 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Adimarantis 2022-07-26 15:10:06 +00:00
parent 5c8469a86d
commit 62695e9517
3 changed files with 17 additions and 10 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- bugfix: 50_Signalbot: update contacts on startup, signal-cli 0.10.9
- feature: 96_Snapcast: group volume now can be set
- feature: 49_SSCam: text field long for some attributes, the body text
can contain HTML-Tags when sending snaps/recordings

View File

@ -1,6 +1,6 @@
##############################################
#$Id$
my $Signalbot_VERSION="3.8";
my $Signalbot_VERSION="3.9";
# Simple Interface to Signal CLI running as Dbus service
# Author: Adimarantis
# License: GPL
@ -160,6 +160,7 @@ sub Signalbot_Set($@) { #
my $cmd = shift @args;
my $account = ReadingsVal($name,"account","none");
my $version = $hash->{helper}{version};
return "$name not initialized" if (!defined $version);
my $multi = $hash->{helper}{multi};
my @accounts;
@accounts =@{$hash->{helper}{accountlist}} if defined $hash->{helper}{accountlist};
@ -538,6 +539,8 @@ sub Signalbot_prepareSend($@) {
sub Signalbot_Get($@) {
my ($hash, $name, @args) = @_;
my $version = $hash->{helper}{version};
return "$name not initialized" if (!defined $version);
my $numberOfArgs = int(@args);
return "Signalbot_Get: No cmd specified for get" if ( $numberOfArgs < 1 );
@ -1256,10 +1259,6 @@ sub Signalbot_CallDbus($@) {
}
my $b=$msg->get_body();
my @body=@$b;
if (!defined $hash->{$function}) {
LogUnicode $hash->{NAME}, 5, $hash->{NAME}.": Invalid callback: $function Args:".join(",",@body);
return;
}
LogUnicode $hash->{NAME}, 5, $hash->{NAME}.": DBus callback: $function Args:".join(",",@body);
CallFn($hash->{NAME},$function,$hash,@body);
}

View File

@ -1,6 +1,6 @@
#!/bin/bash
#$Id:$
SCRIPTVERSION="3.8"
SCRIPTVERSION="3.9"
# Author: Adimarantis
# License: GPL
#Install script for signal-cli
@ -8,7 +8,7 @@ SIGNALPATH=/opt
SIGNALUSER=signal-cli
LIBPATH=/usr/lib
SIGNALVERSION="0.9.2" #Default for systems that don't hava Java17
ALTVERSION="0.10.5" #Default for systems with Java17
ALTVERSION="0.10.9" #Default for systems with Java17
SIGNALVAR=/var/lib/$SIGNALUSER
DBSYSTEMD=/etc/dbus-1/system.d
DBSYSTEMS=/usr/share/dbus-1/system-services
@ -24,7 +24,14 @@ J17=`apt-cache search --names-only 'openjdk-17-jdk-headless'`
if ! [ "$JAVA_HOME" = "" ]; then
JAVACMD=$JAVA_HOME/bin/java
fi
JVER=`$JAVA_HOME/bin/java --version | grep -m1 -o '[0-9][0-9]\.[0-9]'`
if [ -e "/opt/java" ]; then
JVER=`/opt/java/bin/java --version | grep -m1 -o '[0-9][0-9]\.[0-9]'`
if [ "$JVER" = "17.0" ]; then
JAVACMD="/opt/java/bin/java"
export JAVA_HOME="/opt/java"
fi
fi
JVER=`$JAVACMD --version | grep -m1 -o '[0-9][0-9]\.[0-9]'`
if [ "$J17" != "" ] || [ "$JVER" = "17.0" ]; then
SIGNALVERSION=$ALTVERSION
VEXT="-Linux"
@ -172,7 +179,7 @@ fi
GLIBC=`ldd --version | grep -m1 -o '[0-9]\.[0-9][0-9]' | head -n 1`
IDENTSTR=$ARCH-glibc$GLIBC-$SIGNALVERSION
KNOWN=("amd64-glibc2.27-0.9.2" "amd64-glibc2.28-0.9.2" "amd64-glibc2.31-0.9.2" "armhf-glibc2.28-0.9.2" "armhf-glibc2.31-0.9.2" "amd64-glibc2.28-0.10.5" "amd64-glibc2.31-0.10.5" "armhf-glibc2.28-0.10.5" "armhf-glibc2.31-0.10.5")
KNOWN=("amd64-glibc2.27-0.9.2" "amd64-glibc2.28-0.9.2" "amd64-glibc2.31-0.9.2" "armhf-glibc2.28-0.9.2" "armhf-glibc2.31-0.9.2" "amd64-glibc2.28-0.10.9" "amd64-glibc2.31-0.10.9" "armhf-glibc2.28-0.10.9" "armhf-glibc2.31-0.10.9")
GETLIBS=1
if [[ ! " ${KNOWN[*]} " =~ " ${IDENTSTR} " ]]; then
@ -207,7 +214,7 @@ echo "Signal version: $SIGNALVERSION"
echo "System library path: $LIBPATH"
echo "System architecture: $ARCH"
echo "System GLIBC version: $GLIBC"
echo "Using Java version: $JAVA_VERSION"
echo "Using Java version: $JAVA_VERSION ($JAVACMD)"
fi
check_and_update() {