systemd startup script has an hardcoded $PATH
Open
Nobody has claimed this yet.
SYS: Startup
T: Enhancement
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
The PATH in the systemd script is hard set:
https://github.com/Unitech/pm2/blob/34f27878a3f88472a4fc005f9dbb74ac97d4c863/lib/templates/init-scripts/systemd.tpl#L12
It would be better if the script take the $PATH in the current env:
https://github.com/Unitech/pm2/blob/development/lib/API/Startup.js#L295
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read lib/templates/init-scripts/systemd.tpl around line 12 and lib/API/Startup.js around line 295 to understand how the systemd script is generated. Verify how the current environment PATH is available there, then confirm the generated startup script uses that PATH instead of the hardcoded value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100