diff --git a/salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version b/salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version index 29c2c219..d8d3a9ca 100755 --- a/salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version +++ b/salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version @@ -1,8 +1,9 @@ #!/usr/bin/env bash -version="$(head -n3 /srv/ffdd-server/init_server.sh | grep -oP '(?<=^#version=).+' | tr -d '"')" -rev="$(cd /srv/ffdd-server && git describe --all --abbrev=0 | cut -f2 -d"/")" -commit="$(cd /srv/ffdd-server && git show --oneline -s | awk '{print $1}')" +install_dir="$(uci -qX get ffdd.sys.install_dir)" +version="$(head -n3 "$install_dir"/init_server.sh | grep -oP '(?<=^#version=).+' | tr -d '"')" +rev="$(cd "$install_dir" && git describe --all --abbrev=0 | cut -f2 -d"/")" +commit="$(cd "$install_dir" && git show --oneline -s | awk '{print $1}')" printf '%s - %s (%s)\n' "$version" "$rev" "$commit"