Protect startup script with a lockfile