angeloc / htpdate

The (new) home of HTTP Time Protocol (HTP)
Other
38 stars 5 forks source link

Add support for relative path for the pidfile #9

Closed victor-timofei closed 3 years ago

victor-timofei commented 3 years ago

In the example below:

sudo ./htpdate -D -s -i htp.pid www.wikipedia.org

It will create a file in the root directory instead of the directory from which the program was launched.

twekkel commented 2 years ago

@victor-timofei code change was not required.... just start with ${PWD}

./htpdate -D -s -i ${PWD}/htp.pid www.wikipedia.org

victor-timofei commented 2 years ago

You can even do:

${PWD}/htpdate -D -s -i ${PWD}/htp.pid www.wikipedia.org

I know it is not essential, but it improves the usability. Many users, including me, expect relative paths to work.