Node Manager Pm2

PHP

Plesk extension for managing PM2-powered Node.js applications with process control, monitoring, deployment automation, and seamless server integration.

Stars
16
Forks
2
Downloads
N/A
Open Issues
0
Files main

Repository Files

Loading file structure...
sbin/pm2-helper
#!/bin/sh
set -eu

ACTION="${1:-}"
NPM_BIN="${2:-npm}"

case "$ACTION" in
  install)
    NPM_DIR=$(dirname "$NPM_BIN")
    export PATH="$NPM_DIR:$PATH"
    exec "$NPM_BIN" install --global pm2@latest
    ;;
  *)
    echo "Usage: pm2-helper install [npm-bin]" >&2
    exit 2
    ;;
esac