NullDev / forever.sh

:arrows_counterclockwise: A bash script to managed multiple foreverjs instances at once.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

forever.sh


🔁 Bash script to managed multiple foreverjs instances at once.

What does it do?

It starts multiple specified scripts at once with foreverjs.

How?

src="app.js"

On Line 5 specifies the name of the script to execute in the directories mentioned below.


declare -a arr=(
	"folder1"
	"folder2"
	"folder3"
	"and so on..."
)

From Line 8 to Line 13 sets the name of the folders (in the current directory) in which the script (specified above) will get executed.


declare -a abs=(
	"ExampleScript1 -c python /path/to/script.py"
	"ExampleScript2 /path/to/script.js"
	"and so on..."
)

From Line 16 to Line 20 specifies other script. Whether they are in a different directory, are not NodeJS or if they do not feature a script with the above specified name you can add them here. All paths are absolut!


Anything else?

The script features some arguments:

Argument Explanation
-s or --stop Stops all scripts
-r or --restart Stops and restarts all scripts

That's all 😸


       Screenshot       


About

:arrows_counterclockwise: A bash script to managed multiple foreverjs instances at once.

License:MIT License


Languages

Language:Shell 100.0%