Mentohust不能使用的解决办法

固然,这里的前提是你已经安装了mentohust,java

pgrep -u root mentohust
kill [pid]
sudo mentohust -u[user] -p[password]

ok,结束已有的进程,重启服务,解决了。。shell

如何开机自动运行mentohust呢??
http://my.oschina.net/wanborj/blog/55635 中也有相应的介绍,笔者测试成功。vim

可是问题出现了。。学习

shutdown -P now后,mentohust进程没法终止

查看wiki是一个很好的学习习惯,上面无非也是下面的两种方法:测试

第一种方法:.net

chmod u+x mentohustcode

应用程序->添加应用程序:blog

这样添加完就ok了。进程

第二种方法:get

vim /etc/rc.local,一般只有r权限,固然,你能够 chmod一下.

在exit以前加入:

if [ -x /usr/bin/mentohust ]; then
    /usr/bin/mentohust
fi

ok,搞定! 

笔者想了一种办法:

vim /etc/init.d/login.sh
sudo mentohust<<"root";
# if you have:chomd u+x mentohust
# mentoust;
if [ shutdown -P | -r ]
   then
      $temp = pgrep -u root mentohust;
      kill temp;
fi
#本人第一次写shell,因此,命令调用的条件控制不会,但愿大虾们指指错。
相关文章
相关标签/搜索