mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-01-12 16:53:21 +08:00
Update for PR comments
- shellcheck adjustments for sysv init script - launchd/systemd disabled respawn - updated docs to reflect changes
This commit is contained in:
@@ -11,12 +11,6 @@
|
||||
<string>--config=/etc/stacks-blockchain/Config.toml</string>
|
||||
</array>
|
||||
|
||||
<key>Nice</key>
|
||||
<integer>1</integer>
|
||||
|
||||
<key>StartInterval</key>
|
||||
<integer>60</integer>
|
||||
|
||||
<key>ProcessType</key>
|
||||
<integer>Standard</integer>
|
||||
|
||||
@@ -27,6 +21,13 @@
|
||||
<string>/tmp/stacks-blockchain.log</string>
|
||||
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<false/>
|
||||
|
||||
<key>ExitTimeOut</key>
|
||||
<integer>60</integer>
|
||||
|
||||
<key>KeepAlive</key>
|
||||
<false/>
|
||||
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -55,15 +55,14 @@ stacks_log=${STACKS_BLOCKCHAIN_LOG-/stacks-blockchain/output.log}
|
||||
|
||||
|
||||
start() {
|
||||
if [ ! -f $stacks_config ];then
|
||||
if [ ! -f "$stacks_config" ];then
|
||||
echo -n "Missing config file: $stacks_config "
|
||||
return 1
|
||||
fi
|
||||
[ -x $exec ] || exit 5
|
||||
echo -n $"Starting $prog: "
|
||||
$stacks_bin start --config=$stacks_config > $stacks_log 2>&1 &
|
||||
$stacks_bin start --config="$stacks_config" > "$stacks_log" 2>&1 &
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && touch $lockfile
|
||||
[ $RETVAL -eq 0 ] && touch "$lockfile"
|
||||
echo
|
||||
return $RETVAL
|
||||
}
|
||||
@@ -73,7 +72,7 @@ stop() {
|
||||
killproc $prog -INT
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f $lockfile
|
||||
[ $RETVAL -eq 0 ] && rm -f "$lockfile"
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
@@ -111,4 +110,4 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $?
|
||||
exit $?
|
||||
@@ -24,7 +24,7 @@ PermissionsStartOnly=true
|
||||
####################
|
||||
Type=simple
|
||||
PIDFile=/run/stacks-blockchain/stacks-blockchain.pid
|
||||
Restart=on-failure
|
||||
Restart=no
|
||||
TimeoutStopSec=600
|
||||
KillSignal=SIGTERM
|
||||
|
||||
|
||||
@@ -82,7 +82,9 @@ setting the STACKS_BLOCKCHAIN_CONFIG and STACKS_BLOCKCHAIN_LOG environment varia
|
||||
Copy org.stacks.stacks-blockchain.plist into ~/Library/LaunchAgents. Load the launch agent by
|
||||
running `launchctl load ~/Library/LaunchAgents/org.stacks.stacks-blockchain.plist`.
|
||||
|
||||
This Launch Agent will cause the stacks-blockchain to start whenever the user logs in.
|
||||
This Launch Agent will **not** start the stacks-blockchain whenever the user logs in.
|
||||
|
||||
To start the service, you'll need to manually run the start command: `launchctl start org.stacks.stacks-blockchain`
|
||||
|
||||
NOTE: This approach is intended for those wanting to run stacks-blockchain as the current user.
|
||||
You will need to modify org.stacks.stacks-blockchain.plist if you intend to use it as a
|
||||
@@ -90,4 +92,4 @@ Launch Daemon with a dedicated stacks user.
|
||||
|
||||
## Auto-respawn
|
||||
|
||||
Auto respawning is currently only configured for systemd.
|
||||
Auto respawning is currently disabled.
|
||||
|
||||
Reference in New Issue
Block a user