Move pid file name to var
Cleanup the bash script