Only kill processes if there are any running

This commit adds a guard around sending a blank string to kill in order to suppress warnings when booting with foreman