do not kill the process if it's not needed

This commit is contained in:
Kay0u 2020-12-25 22:19:30 +01:00
parent beb8c992c1
commit 905507d072
No known key found for this signature in database
GPG key ID: AE1DCADB6415A156

View file

@ -124,9 +124,10 @@ parse_args
if [[ $force_stop == 1 ]]
then
package_check_pid="$(cat "./pcheck.lock" | cut -d: -f3)"
kill --signal 15 $package_check_pid
LXC_RESET
package_check_pid="$(cat "./pcheck.lock" 2> /dev/null | cut -d: -f3)"
if [ -n "$package_check_pid" ]; then
kill --signal 15 $package_check_pid
fi
clean_exit 0
fi