zapty / forever-service

Provision node script as a service via forever, allowing it to automatically start on boot, working across various Linux distros and OS
https://github.com/zapty/forever-service
MIT License
595 stars 65 forks source link

cwd in script is expanded to real path for symlinks #89

Open azatoth opened 7 years ago

azatoth commented 7 years ago

When using for example shipit for deployment, it deploys into a releases/DATETIME dir and generates a symlink at current; When forever-service is executed in the currentdir, cwd is expaned into the releases/DATETIME and thus having the realpath encoded in the init script, resulting in having to delete and regenerate the scripts for each deployment.

Might be possible to change process.cwd into process.env.PWD though it's possibly platform dependent.