Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments
Open

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

GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

我用的是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 [email protected] on 2 Apr 2014 at 5:16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant