service "$service" status 返回的状态 sudo servicem "$service" status$? #上个命令的退出状态,或函数的返回值。 $? =0 表示在运行 =1 服务未知或不存在 =3 服务暂停 纵有疾风起,人生不言弃!