add
This commit is contained in:
@@ -348,12 +348,12 @@ setup_launchd() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
NODE_BIN=$(command -v node)
|
NODE_BIN=$(command -v node)
|
||||||
if [ -n "${NODE_BIN}" ]; then
|
if [ -z "${NODE_BIN}" ]; then
|
||||||
NODE_DIR=$(dirname "${NODE_BIN}")
|
log_error "未找到 node 可执行文件。"
|
||||||
LAUNCH_PATH="${NODE_DIR}:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
exit 1
|
||||||
else
|
|
||||||
LAUNCH_PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
|
||||||
fi
|
fi
|
||||||
|
NODE_DIR=$(dirname "${NODE_BIN}")
|
||||||
|
LAUNCH_PATH="${NODE_DIR}:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||||
cat > "${PLIST_PATH}" <<EOF
|
cat > "${PLIST_PATH}" <<EOF
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
@@ -363,6 +363,7 @@ setup_launchd() {
|
|||||||
<string>${PLIST_LABEL}</string>
|
<string>${PLIST_LABEL}</string>
|
||||||
<key>ProgramArguments</key>
|
<key>ProgramArguments</key>
|
||||||
<array>
|
<array>
|
||||||
|
<string>${NODE_BIN}</string>
|
||||||
<string>${GATEWAY_BIN}</string>
|
<string>${GATEWAY_BIN}</string>
|
||||||
<string>gateway</string>
|
<string>gateway</string>
|
||||||
<string>--verbose</string>
|
<string>--verbose</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user