diff --git a/gocrypt.bash b/gocrypt.bash index c6f8608..2d05245 100755 --- a/gocrypt.bash +++ b/gocrypt.bash @@ -52,7 +52,7 @@ gocrypt_spawn_close_task() { local task_name="$(gocrypt_unique_task_identifier)" # Cancel any previous task that might be present - systemctl --user stop "$task_name.timer" > /dev/null 2>&1 + systemctl --user stop "$task_name.timer" > /dev/null 2>1 # Create a new task systemd-run --user --on-active=$gocrypt_close_timeout --unit="$task_name" \ @@ -147,7 +147,7 @@ gocrypt_open() { fi fi - gocryptfs -passfile /dev/stdin "$gocrypt_dir" "$gocrypt_dec_dir" <<< "$gocrypt_passwd" || gocrypt_die "Unable to decrypt" + gocryptfs -passfile /dev/stdin "$gocrypt_dir" "$gocrypt_dec_dir" <<< "$gocrypt_passwd" gocrypt_spawn_close_task }