I know it's a bit of a specific hack but would it suffice to wrap the current code in an if?

```
if [[ ! -f "$APP_PATH/PS" ]]; then 
  # current kill / start code here
fi
```