ITeye博客

Solaris boot Script

wwbutton · 2008-08-07 10:20 · Solaris · Markdown

Solaris 系统启动脚本

今晚帮朋友装一套系统软件。写了一个系统启动脚本虽然简单但第一次写还是挺折腾的 。

who -r 查看系统运行级别 root@v250 # who -r . run-level 3 Sep 28 22:39 3 0 S

#建立系统启动脚本 vi /etc/init.d/Jedi #!/sbin/sh

WTWY co.

All rights reserved.

write by ww 05/09/28 SMI"

case "$1" in 'start') su - root -c "/usr/local/tomcat/bin/startup.sh" su - postgres -c "bin/pg_ctl start -D ./data" ;; 'stop') su - postgres -c "bin/pg_ctl stop -W -D ./data -m fast" su - root -c "/usr/local/tomcat/bin/shutdown.sh" exit 1 ;; esac exit 0

改变权限

chmod +x Jedi #建立链接
ln -s /etc/init.d/Jedi /etc/rc2.d/S99Jedi ln -s /etc/init.d/Jedi /etc/rc3.d/S99Jedi ln -s /etc/init.d/Jedi /etc/rc0.d/K10Jedi

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。