fix YNH_APP_BASEDIR during actions

This commit is contained in:
Kay0u 2021-09-14 18:55:27 +02:00
parent a2c5895cd3
commit eb5cb1311e
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -1,6 +1,6 @@
#!/bin/bash
YNH_APP_BASEDIR=$(realpath $([[ "$(basename $0)" =~ ^backup|restore$ ]] && echo '../settings' || echo '..'))
YNH_APP_BASEDIR=$(realpath $([[ "$(basename $0)" =~ ^backup|restore$ ]] && echo '../settings' || [[ -n "$YNH_ACTION" ]] && echo '.' || echo '..' ))
# Handle script crashes / failures
#