diff --git a/debian/fabaccess-bffh-src/debian/fabaccess-bffh.install b/debian/fabaccess-bffh-src/debian/fabaccess-bffh.install index fc38995..7eb2df7 100644 --- a/debian/fabaccess-bffh-src/debian/fabaccess-bffh.install +++ b/debian/fabaccess-bffh-src/debian/fabaccess-bffh.install @@ -1,4 +1,3 @@ -./etc/bffh/bffh.dhall /etc/bffh/ ./etc/bffh/config_examples/ /etc/bffh/config_examples/ ./etc/logrotate.d/bffhd /etc/logrotate.d/ diff --git a/debian/fabaccess-bffh-src/debian/postinst b/debian/fabaccess-bffh-src/debian/postinst index 2bab21f..eb34a0d 100755 --- a/debian/fabaccess-bffh-src/debian/postinst +++ b/debian/fabaccess-bffh-src/debian/postinst @@ -50,6 +50,35 @@ echo -e " - please check the CHANGELOG for latest modifications to the server at echo -e " - further information about configuration and usage can be found at \e[36mhttps://fab-access.org/configure\e[0m" echo -e " - the client application to access your server (called 'Borepin') can be found at \e[36mhttps://fab-access.org/download\e[0m\n" +# create default bffh.dhall from --print-default +if command -v dhall 2>&1 >/dev/null; then + /usr/bin/bffhd --print-default | dhall format > /etc/bffh/bffh.dhall +else + +cat < /etc/bffh/bffh.dhall +{- +If you want to re-format this file, please install the dhall package: + + sudo $PACKMAN install dhall + +Then you can use some command syntax like: + + CFG="/etc/bffh/bffh.dhall" && \\ + dhall format < \$CFG && \\ + dhall format < \$CFG > \$CFG.bup && \\ + rm \$CFG && \\ + mv \$CFG.bup \$CFG + +You can also re-create this file easily by: + + /usr/bin/bffhd --print-default | dhall format > /etc/bffh/bffh.dhall +-} + +EOF +/usr/bin/bffhd --print-default >> /etc/bffh/bffh.dhall +fi + + # check for Mosquitto availability on local system if command -v dnf 2>&1 >/dev/null; then dnf list installed mosquitto > /dev/null 2>&1 diff --git a/debian/fabaccess-bffh-src/debian/watch b/debian/fabaccess-bffh-src/debian/watch deleted file mode 100644 index 39e8850..0000000 --- a/debian/fabaccess-bffh-src/debian/watch +++ /dev/null @@ -1,3 +0,0 @@ -version=4 -opts="searchmode=plain" \ - https://gitlab.com/fabinfra/@PACKAGE@/tags?sort=updated_desc -/archive/v?\d[\d.]+/@PACKAGE@-@ANY_VERSION@@ARCHIVE_EXT@ diff --git a/debian/fabaccess-bffh-src/etc/bffh/bffh.dhall b/debian/fabaccess-bffh-src/etc/bffh/bffh.dhall deleted file mode 100644 index af15757..0000000 --- a/debian/fabaccess-bffh-src/etc/bffh/bffh.dhall +++ /dev/null @@ -1,16 +0,0 @@ -{ -spacename = "fabaccess.sample.space", -instanceurl = "https://fabaccess.sample.space", -listens = [{address = "127.0.0.1"}], -certfile = "/etc/bffh/certs/bffh.crt", -keyfile = "/etc/bffh/certs/bffh.key", -mqtt_url = "mqtt://127.0.0.1:1883", -db_path = "/var/lib/bffh/bffh.db", -auditlog_path = "/var/log/bffh/audit.json", -roles = {=}, -machines = {=}, -actors = {=}, -actor_connections = [] : List { machine : Text, initiator : Text }, -initiators = {=}, -init_connections = [] : List { machine : Text, initiator : Text } -}