実行しようとするとエラーが発生します。
~/projects/test-app
/usr/local/bin/meteor:3
# This is the script that we install somewhere in your $PATH (as "meteor")
これが私が実行するコマンドです:
pm2 start meteor-pm2.json
そして、ここに meteor-pm2.json があります:
{
"name" : "test-app",
"script" : "/usr/local/bin/meteor",
"MAIL_URL":"smtp://yourmail_configuration_here",
"MONGO_URL":"mongodb://localhost:27017/meteor",
"ROOT_URL":"https://www.mysite.com/",
"PORT":"3000",
"out_file":"/home/josh/logs/app.log",
"error_file":"/home/josh/logs/err.log"
}
私もこれを試します:cat start
#!/bin/bash
MONGO_URL="mongodb://localhost:27017/meteor"
PORT=3000
ROOT_URL="https://www.mysite.com/"
/usr/local/bin/meteor
そして私はそれを実行します:
pm2 start ./start -x interpreter bash
そして私は得る:
/usr/local/bin/meteor
^
ReferenceError: usr is not defined
エクスポートを追加してbashスクリプトを変更すると:
#!/bin/bash
export MONGO_URL="mongodb://localhost:27017/meteor"
export PORT=3000
export ROOT_URL="https://www.mysite.com/"
/usr/local/bin/meteor
私は得る:
export - SyntaxError: Unexpected reserved word
私が間違っていることは何ですか?pm2 は、エクスポートの使用を許可しない独自の特別なスクリプト インタープリターで bash スクリプトを実行しようとしていますか?