1.將你的啓動jupyter.sh腳本複製到 /etc/init.d目錄下
2.設置腳本執行權限
sudo chmod 755 /etc/init.d/jupyter.sh
3.將腳本放到啓動腳本中去
$ cd /etc/init.d
$ sudo update-rc.d jupyter.sh defaults 100
- 在jupyter.sh腳本中添加LSB信息
#!/bin/sh
### BEGIN INIT INFO
# Provides: svnd.sh
# Required-start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the svnd.sh daemon
# Description: starts svnd.sh using start-stop-daemon
### END INIT INFO
5.重啓機器
reboot
卸載啓動腳本的方法:
$ cd /etc/init.d
$ sudo update-rc.d -f jupyter.sh remove