Node.js tartup script for AWS EC2 Linux box
✓ Published0🌍 Public
Aalessioalex
Last edited Dec 29, 2010
Created on Jun 20, 2011
This shell script provides a startup and service management routine for a Node.js server on an AWS EC2 Linux instance. It defines start, stop, and restart functions that launch the Node process as the ec2-user, redirecting output to a log file, and manage a lock file to track service status. The script uses standard init.d functions like `daemon`, `killproc`, and `status` from `/etc/rc.d/init.d/functions`, and it raises the file descriptor limit with `ulimit`. It reads optional configuration from `/etc/sysconfig/nodejs` and handles command-line actions including start, stop, restart, reload, condrestart, and status.
AI-generated description