This commit is contained in:
Sefinek committed 2025-01-18 03:36:15 +01:00
1 parent 6b9607065e
commit 6254d47426
1 file changed
+7 -5
+7 -5
View File
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
USER=${SUDO_USER:-$(whoami)}
# Function to prompt for a Yes/no answer
yes_no_prompt() {
local prompt="$1"
@@ -179,19 +181,19 @@ chown "$USER":"$USER" /var/log/ufw-abuseipdb -R
# Configure pm2
echo "⚙️ Configuring PM2..."
pm2 start
pm2 startup
sudo -u "$USER" pm2 start
sudo -u "$USER" pm2 startup
# Execute the command generated by pm2 startup
echo "🔧 Complete pm2 startup configuration:"
echo "🔧 Complete pm2 startup configuration (for $USER):"
sudo env PATH="$PATH":/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u "$USER" --hp /opt/"$USER"
pm2 save
sudo -u "$USER" pm2 save
# Final
echo -e "\n\n🌌 Checking PM2 status..."
pm2 status
sudo -u "$USER" pm2 status
echo -e "\n🎉 Installation and configuration completed! Use the 'pm2 logs' command to monitor logs in real time."