Changed restart command by Rublis suggestion. Added status control so the process restart happens only if the screen is locked