{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7585","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7585/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7585/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7585/events","html_url":"https://github.com/spring-projects/spring-boot/issues/7585","id":193967673,"number":7585,"title":"Documentation is missing for how exactly PID_FOLDER/LOG_FOLDER variables initialized at Spring Boot startup script","user":{"login":"maximkir","id":4746489,"avatar_url":"https://avatars.githubusercontent.com/u/4746489?v=3","gravatar_id":"","url":"https://api.github.com/users/maximkir","html_url":"https://github.com/maximkir","followers_url":"https://api.github.com/users/maximkir/followers","following_url":"https://api.github.com/users/maximkir/following{/other_user}","gists_url":"https://api.github.com/users/maximkir/gists{/gist_id}","starred_url":"https://api.github.com/users/maximkir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximkir/subscriptions","organizations_url":"https://api.github.com/users/maximkir/orgs","repos_url":"https://api.github.com/users/maximkir/repos","events_url":"https://api.github.com/users/maximkir/events{/privacy}","received_events_url":"https://api.github.com/users/maximkir/received_events","type":"User","site_admin":false},"labels":[{"id":293438798,"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/waiting-for-triage","name":"waiting-for-triage","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-07T06:22:38Z","updated_at":"2016-12-07T18:11:39Z","closed_at":null,"body":"According to documentation, the **PID_FOLDER/LOG_FOLDER** variables, which can be part of the environment or located at the config file, specify the root folder for process pid / logs folder respectively.\r\n\r\nI inspected the the embedded launch.script that sets those variables:\r\n\r\n```\r\n# Initialize PID/LOG locations if they weren't provided by the config file\r\n[[ -z \"$PID_FOLDER\" ]] && PID_FOLDER=\"{{pidFolder:/var/run}}\"\r\n[[ -z \"$LOG_FOLDER\" ]] && LOG_FOLDER=\"{{logFolder:/var/log}}\"\r\n! [[ \"$PID_FOLDER\" == /* ]] && PID_FOLDER=\"$(dirname \"$jarfile\")\"/\"$PID_FOLDER\"\r\n! [[ \"$LOG_FOLDER\" == /* ]] && LOG_FOLDER=\"$(dirname \"$jarfile\")\"/\"$LOG_FOLDER\"\r\n! [[ -x \"$PID_FOLDER\" ]] && PID_FOLDER=\"/tmp\"\r\n! [[ -x \"$LOG_FOLDER\" ]] && LOG_FOLDER=\"/tmp\"\r\n```\r\n\r\nAs I understand, the first two lines sets the variables to /var/run & /var/log in case no definition found not in environment nor in configuration file (which is stated at the documentation as default values).\r\n\r\nThe next 2 lines aren't clear to me, in case the variable set different that some values the folder will be set relatively to jar file location. What those values? Please add more detailed documentation.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/265525447","html_url":"https://github.com/spring-projects/spring-boot/issues/7585#issuecomment-265525447","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7585","id":265525447,"user":{"login":"philwebb","id":519772,"avatar_url":"https://avatars.githubusercontent.com/u/519772?v=3","gravatar_id":"","url":"https://api.github.com/users/philwebb","html_url":"https://github.com/philwebb","followers_url":"https://api.github.com/users/philwebb/followers","following_url":"https://api.github.com/users/philwebb/following{/other_user}","gists_url":"https://api.github.com/users/philwebb/gists{/gist_id}","starred_url":"https://api.github.com/users/philwebb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philwebb/subscriptions","organizations_url":"https://api.github.com/users/philwebb/orgs","repos_url":"https://api.github.com/users/philwebb/repos","events_url":"https://api.github.com/users/philwebb/events{/privacy}","received_events_url":"https://api.github.com/users/philwebb/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T18:11:39Z","updated_at":"2016-12-07T18:11:39Z","body":"Those \"next 2 lines\" lines were added in 24f8c737fb4f543e70741f42916128274c3f5021. It's using pattern matches to find out if the path is relative or not. i.e. if `$PID_FOLDER` doesn't start with `/` then it's a relative path and we should consider it as location relative from the directory that contains the jar."}}
{"actor":{"display_login":"philwebb"}}