顯然我最初的問題是模糊或被解釋爲一個壞問題。Volttron init守護進程
我會再試一次。
有一個名爲volttron的文件位於volttron/scripts/admin /內容表明它是/是從一個init開始的一個Volttron守護進程。我注意到它指的是venv之外的路徑(/ var/lib/volttron)爲什麼這個文件在那裏?是否有計劃修改它?有人修改此文件以實現從init開始?是否有關於這個問題的文件?
對於在計算機系統上提供服務的任何程序,自動初始化都是非常重要的功能。
我已經提供了一段代碼。
#! /bin/sh
### BEGIN INIT INFO
# Provides: volttron
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network $named
# Should-Start: $network $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: VOLTTRON (TM) Daemon
# Description: VOLTTRON (TM) agent execution platform.
### END INIT INFO
# Author: Brandon Carpenter <[email protected]>
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="VOLTTRON (TM) agent execution platform"
NAME=volttron
USER=volttron
VLHOME=/var/lib/volttron
DAEMON_ARGS="-v -l $VLHOME/volttron.log"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
似乎按廣告宣傳謝謝先生。 – Dave