ubuntu 设置自启动脚本

有时候需要在开机就执行下脚本。。特别是那个mentohust。。。每次开机运行麻烦的很啊。。。所以就写了个脚本 

sudo touch mentohust.sh
sudo vim mentohust.sh


内容为

#!/bin/bash
mentohust -b1   #后台运行

 给点权限:sudo chmod a+x mentohust.sh 

 然后移到 /etc/init.d/ 目录下:sudo cp mentohust.sh /etc/init.d/ 

执行update-rc.d mentohust.sh defaults 98 

 就可以了。。很方便嘛!

posted @ 2011-08-15 03:23  int32bit  阅读(118)  评论(0编辑  收藏  举报