ynh_clean_check_starting: Let's not trigger an error when vars aren't set

This commit is contained in:
Alexandre Aubin 2021-03-14 18:47:33 +01:00 committed by GitHub
parent 721f6f265e
commit 07f8d6d7af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,12 +171,12 @@ ynh_systemd_action() {
#
# Requires YunoHost version 3.5.0 or higher.
ynh_clean_check_starting () {
if [ -n "$pid_tail" ]
if [ -n "${pid_tail:-}" ]
then
# Stop the execution of tail.
kill -SIGTERM $pid_tail 2>&1
fi
if [ -n "$templog" ]
if [ -n "${templog:-}" ]
then
ynh_secure_remove --file="$templog" 2>&1
fi