linux service script rewritten to use pid