Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not use different name than pm2 for service #46

Open
jaric85 opened this issue Jan 12, 2022 · 0 comments
Open

Can not use different name than pm2 for service #46

jaric85 opened this issue Jan 12, 2022 · 0 comments

Comments

@jaric85
Copy link

jaric85 commented Jan 12, 2022

Description
Can not use different name than pm2 for service.
Following error appears at the end of installation process
Could not find "pm2.exe" service after 10 attempts.

Relevant code references
pm2-installer/src/windows/setup-service.ps1:332
Set-ServiceUser -name "pm2.exe" -username "NT AUTHORITY\LocalService" -pass ""

pm2-installer/src/windows/setup-service.ps1:335
Confirm-Service -name "pm2.exe"

pm2-installer/src/windows/service-management/install.js:29
name = name || process.env.PM2_SERVICE_NAME || 'PM2';

pm2-installer/src/windows/setup-service.ps1:332
Set-ServiceUser -name "pm2.exe" -username "NT AUTHORITY\LocalService" -pass ""

pm2-installer/src/windows/setup-service.ps1:335
Confirm-Service -name "pm2.exe"

NOTE:
installing services with PM2_SERVICE_NAME result in creation of
daemon\PM2_SERVICE_NAME.exe
instead
daemon\pm2.exe

but name "-" is trimmed from name, and maybe some other characters

Steps to Reproduce

  1. set PM2_SERVICE_NAME
  2. npm run configure
  3. npm run setup

Environment
any windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant