compatible with empty .git dir in tomcat conf dir; add op service script