| Server IP : 62.171.151.215 / Your IP : 216.73.217.53 Web Server : nginx/1.18.0 System : Linux vmi3128365 5.15.0-176-generic #186-Ubuntu SMP Fri Mar 13 11:01:42 UTC 2026 x86_64 User : alex ( 1000) PHP Version : 8.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/node_modules/pm2/ |
Upload File : |
const fs = require('fs');
const path = require('path');
// Determine platform
const isWindows = process.platform === 'win32';
if (!isWindows)
process.exit(0)
const sourceFile = 'bin/pm2-windows';
const destinationFile = 'bin/pm2';
// Resolve file paths
const sourcePath = path.resolve(__dirname, sourceFile);
const destinationPath = path.resolve(__dirname, destinationFile);
// Copy the appropriate file based on the platform
fs.copyFile(sourcePath, destinationPath, (err) => {
if (err) {
console.error(`Error copying file from ${sourcePath} to ${destinationPath}:`, err);
process.exit(1);
}
console.log(`Successfully copied ${sourceFile} to ${destinationFile}`);
});