永远启动不会启动脚本但打印帮助命令

时间:2017-02-22 11:07:56

标签: linux bash raspberry-pi forever

我只是想在我的rapsberry上运行一个简单的永远scipt:

#!/bin/sh -e
exec

forever stopall
forever start -c /home/pi/Aubeacon/Node/server.js 
forever start -c /home/pi/Aubeacon/Node1/zWaveServer.js
forever start -c /home/pi/Aubeacon/Node2/alertServer.js
forever start -c /home/pi/Aubeacon/Node3/beaconServer.js

exit 0

但是在说没有进程正在运行之后它会在每次帮助时打印我(这意味着永远停止运行至少可以正常工作)。

info:    No forever processes running
help:    usage: forever [action] [options] SCRIPT [script-options]
help:
help:    Monitors the script specified in the current process or as a daemon
help:
help:    actions:
help:      start               Start SCRIPT as a daemon
help:      stop                Stop the daemon SCRIPT by Id|Uid|Pid|Index|Script
help:      stopall             Stop all running forever scripts
help:      restart             Restart the daemon SCRIPT
help:      restartall          Restart all running forever scripts
help:      list                List all running forever scripts
help:      config              Lists all forever user configuration
help:      set <key> <val>     Sets the specified forever config <key>
help:      clear <key>         Clears the specified forever config <key>
help:      logs                Lists log files for all forever processes
help:      logs <script|index> Tails the logs for <script|index>
help:      columns add <col>   Adds the specified column to the output in `forever list`
help:      columns rm <col>    Removed the specified column from the output in `forever list`
help:      columns set <cols>  Set all columns for the output in `forever list`
help:      columns reset       Resets all columns to defaults for the output in `forever list`
help:      cleanlogs           [CAREFUL] Deletes all historical forever log files
help:
help:    options:
help:      -m  MAX          Only run the specified script MAX times
help:      -l  LOGFILE      Logs the forever output to LOGFILE
help:      -o  OUTFILE      Logs stdout from child script to OUTFILE
help:      -e  ERRFILE      Logs stderr from child script to ERRFILE
help:      -p  PATH         Base path for all forever related files (pid files, etc.)
help:      -c  COMMAND      COMMAND to execute (defaults to node)
help:      -a, --append     Append logs
help:      -f, --fifo       Stream logs to stdout
help:      -n, --number     Number of log lines to print
help:      --pidFile        The pid file
help:      --uid            Process uid, useful as a namespace for processes (must wrap in a string)
help:                       e.g. forever start --uid "production" app.js
help:                           forever stop production
help:      --sourceDir      The source directory for which SCRIPT is relative to
help:      --workingDir     The working directory in which SCRIPT will execute
help:      --minUptime      Minimum uptime (millis) for a script to not be considered "spinning"
help:      --spinSleepTime  Time to wait (millis) between launches of a spinning script.
help:      --colors         --no-colors will disable output coloring
help:      --plain          alias of --no-colors
help:      -d, --debug      Forces forever to log debug output
help:      -v, --verbose    Turns on the verbose messages from Forever
help:      -s, --silent     Run the child script silencing stdout and stderr
help:      -w, --watch      Watch for file changes
help:      --watchDirectory Top-level directory to watch from
help:      --watchIgnore    To ignore pattern when watch is enabled (multiple option is allowed)
help:      -t, --killTree   Kills the entire child process tree on `stop`
help:      --killSignal     Support exit signal customization (default is SIGKILL)
help:                       used for restarting script gracefully e.g. --killSignal=SIGTERM
help:      -h, --help       You're staring at it
help:
help:    [Long Running Process]
help:      The forever process will continue to run outputting log messages to the console.
help:      ex. forever -o out.log -e err.log my-script.js
help:
help:    [Daemon]
help:      The forever process will run as a daemon which will make the target process start
help:      in the background. This is extremely useful for remote starting simple node.js scripts
help:      without using nohup. It is recommended to run start with -o -l, & -e.
help:      ex. forever start -l forever.log -o out.log -e err.log my-daemon.js
help:          forever stop my-daemon.js

它给我打印了4次帮助,所以它打印出了帮助,因为它很难理解启动命令。

问题是我在服务器端运行相同类型的脚本,它完全正常......

我看到了与存储库或文件相关的一些特权问题,但我确实用chmod 777更改了特权,以确保它不是那个并且它没有改变我的问题。

感谢您的回答

0 个答案:

没有答案