树莓派 设置开机启动项 (并托管后台自动运行)
开机自动挂载U盘 并托管后台开机自动cpolar穿墙 并托管后台开机自动执行特定脚本 并托管后台pi@mini:~ $ cat /etc/rc.local
#!/bin/sh -e## rc.local## This script is executed at the end of each multiuser runlevel.# Make sure that the script will "exit 0" on success or any other# value on error.## In order to enable or disable this script just change the execution# bits.## By default this script does nothing.# Print the IP address_IP=$(hostname -I) || trueif [ "$_IP" ]; thenprintf "My IP address is %s\n" "$_IP"fi# 开机自动挂载U盘 并托管后台nohup sudo mount /dev/sda1 /mnt/usb1# 开机自动cpolar穿墙 并托管后台nohup /home/base/cpolar start-all -config=/home/pi/.cpolar/cpolar.yml -log=stdout &# 开机自动执行特定脚本 并托管后台nohup bash /home/work/mplayer/mvf_b.sh -log=stdout &exit 0