Skip to content

🔄 A bash script to managed multiple foreverjs instances at once.

License

Notifications You must be signed in to change notification settings

NullDev/forever.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

🔄 A bash script to managed multiple foreverjs instances at once.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages