From c3237cdc625132bda90996c540db0f91d5e5a442 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Fri, 14 Mar 2025 00:04:50 +0100 Subject: [PATCH] fix postinst script --- debian/fabaccess-bffh-src/debian/postinst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/fabaccess-bffh-src/debian/postinst b/debian/fabaccess-bffh-src/debian/postinst index 6772d8a..b767848 100755 --- a/debian/fabaccess-bffh-src/debian/postinst +++ b/debian/fabaccess-bffh-src/debian/postinst @@ -114,4 +114,8 @@ echo -e " You can import an example (let's use 'showcase') users database with echo -e " the command '\e[33m/usr/bin/bffhd --load /etc/bffh/config_examples/showcase/users.toml\e[0m'" echo -e " Then you should overwrite /etc/bffh/bffh.dhall with the one from" echo -e " /etc/bffh/config_examples/showcase/bffh.dhall and restart the bffh.service" -echo -e " If you messed up, you can restore your default settings from /etc/bffh/config_examples/minimum_working/\n" +if command -v dhall 2>&1 >/dev/null; then + echo -e " If you messed up, you can restore default by '\e[33m/usr/bin/bffhd --print-default | dhall format > /etc/bffh/bffh.dhall\e[0m'\n" +else + echo -e " If you messed up, you can restore default by '\e[33m/usr/bin/bffhd --print-default > /etc/bffh/bffh.dhall\e[0m'\n" +fi