fix(distro): repair shell script and start server in foreground