Explorar o código

docker: unmount on SIGTERM (previously signal was ignored)

Fabian Peter Hammerle %!s(int64=5) %!d(string=hai) anos
pai
achega
16fb3f04f9
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      docker/rgpgfs_unattended.sh

+ 3 - 1
docker/rgpgfs_unattended.sh

@@ -38,7 +38,9 @@ set -x
 grep -q "^trust-model always$" ~/.gnupg/gpg.conf 2> /dev/null \
     || echo trust-model always | tee ~/.gnupg/gpg.conf
 
+trap 'fusermount3 -u "$CIPHER_DIR"' SIGTERM
 rgpgfs -f -o allow_other \
     -o modules=subdir,subdir="$SOURCE_DIR" \
     -o recipient="$RECIPIENT" \
-    "$CIPHER_DIR"
+    "$CIPHER_DIR" &
+wait $!