标签:
1 [root@MSJTVL-MJSP-A01 sm01]# vim /etc/rc.d/rc.local 2 3 #!/bin/sh 4 # 5 # This script will be executed *after* all the other init scripts. 6 # You can put your own initialization stuff in here if you don‘t 7 # want to do the full Sys V style init stuff. 8 9 touch /var/lock/subsys/local 10 su tomcat -c "/opt/tomcat/start.sh" --把要执行的命令作为一个参数传递级su
启动时指定非ROOT用户执行相应的脚本。
标签:
原文地址:http://www.cnblogs.com/tian880820/p/5567198.html