Server install script updated

A few bug fix of install_server.sh,
and applied the standard patturn of service initialization scripts.