在我写sh脚本时遇到了一个bug
echo -e "PGsql服务启动中......"sleep 5su - postgresservice postgresql startexit
执行后,系统没有反应。并没有让我输入pg库的密码,当我手动输入 exit ,却显示我登陆成功了。查看了进程,5432端口也有了