0

Currently in my upstart script, chdir points to a symlink (soft).

Does chdir respect the symlink or goes directly to the symlinked directory?

The question why I ask this is because in a web server I use (Puma), pwd command now using the chdir stanza does not point to the symlink directory.

See https://github.com/puma/puma/issues/539 for more info.

Thank you.

allaire
  • 101

1 Answers1

0

Upstart will resolve the symlink. You cannot work around this by using a script section and cd /path.

Edit: it looks like it was figured out what the problem was. cd was setting $PWD to the symlink, not the resolved directory, and chdir was not setting $PWD at all, so the app was getting its current working directory and receiving the resolved path.

CameronNemo
  • 1,675