Compare commits

...

2 Commits

Author SHA1 Message Date
Fierelier a68ccd22ea Trap terminal quit for certain actions 2024-02-15 16:37:13 +01:00
Fierelier 3144fe2f91 Better lock message 2024-02-15 16:34:19 +01:00
5 changed files with 6 additions and 1 deletions

View File

@ -4,7 +4,7 @@ APP_CMD="$(realpath "$BASH_SOURCE")"
APP_DIR="$(dirname "$APP_CMD")"
source "$APP_DIR/env"
echo "Acquiring lock ..." >&2
echo "Locking '/run/$APP_NAME/lock' ..." >&2
mkdir -p "/run/$APP_NAME"
exec 100>"/run/$APP_NAME/lock"
set +e

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -e
source "$APP_DIR/cmd/trap"
eval "$(bash "$APP_DIR/cmd/main" plist "$2")"
eject "$mm_path"
set +e

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -e
source "$APP_DIR/cmd/trap"
eval "$(bash "$APP_DIR/cmd/main" plist "$2")"
if [ "$mm_format" = "crypto_LUKS" ]; then

2
app/cmd/trap Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
trap "" SIGINT SIGTERM SIGQUIT SIGHUP

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -e
source "$APP_DIR/cmd/trap"
eval "$(bash "$APP_DIR/cmd/main" plist "$2")"
if [ "$mm_format" = "crypto_LUKS" ]; then