lqxsansan / mentohust

Automatically exported from code.google.com/p/mentohust
0 stars 0 forks source link

建议把mentohust做成系统服务 #249

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
我用的是ubuntu
方法如下:
sudo vi /etc/init.d/mentohust
新建文件:
#!/bin/sh

### BEGIN INIT INFO
# Provides:         adb
# Required-Start:   $remote_fs $syslog
# Required-Stop:    $remote_fs $syslog
# Default-Start:    2 3 4 5
# Default-Stop:     
# Short-Description: Start or stop the adb server.
### END INIT INFO

case "$1" in
  start)
        mentohust -b
        ;;
  stop)
        mentohust -k
        ;;
  restart)
        mentohust -k
        mentohust -b
esac
之后执行命令:
sudo update-rc.d mentohust defaults
今天我换回到gnome 
rc.local不知为什么失效了,试了半天还是新建一个服务靠谱

Original issue reported on code.google.com by hji...@gmail.com on 2 Apr 2014 at 5:16