Ångström Linux 创建自启动服务
beaglebone吧
全部回复
仅看楼主
level 6
btiger 楼主
原始地址如下:
http://beaglebone.cameon.net/home/autostarting-services
The easiest way is to just use the systemd service framework, like is already in use by the demo image. To add a new service, just create a file in /lib/systemd/system/myservice.service with content like:[Unit]Description=Reverse SSH ServiceConditionPathExists=|/usr/binAfter=network.target [Service]ExecStart=/usr/bin/wall "Hello world!"Restart=alwaysRestartSec=10StartLimitInterval=0 [Install]WantedBy=multi-user.target And then make a symlink to this file in /etc/systemd/system/multi-user.target.wants/. The service will start automatically on startup. You can also start and stop it manually, and query the status:
systemctl status myservice.service
systemctl start myservice.service
systemctl stop myservice.service
2013年09月08日 08点09分 1
level 6
btiger 楼主
2013年09月08日 08点09分 2
1