Only run these commands if the variables are not empty

This commit is contained in:
Alexandre Aubin 2019-11-16 15:33:51 +01:00
parent 3d87cc008c
commit 6124d1b899

View file

@ -165,9 +165,15 @@ ynh_systemd_action() {
# #
# usage: ynh_clean_check_starting # usage: ynh_clean_check_starting
ynh_clean_check_starting () { ynh_clean_check_starting () {
if [ -n "$pid_tail" ]
then
# Stop the execution of tail. # Stop the execution of tail.
kill -s 15 $pid_tail 2>&1 kill -s 15 $pid_tail 2>&1
fi
if [ -n "$templog" ]
then
ynh_secure_remove "$templog" 2>&1 ynh_secure_remove "$templog" 2>&1
fi
} }