jessepeterson / margarita

Web frontend for reposado
The Unlicense
245 stars 40 forks source link

StandardErrorPath and StandardOutPath #28

Closed cgerke closed 9 years ago

cgerke commented 9 years ago

I wanted to change these paths so the log files reside inside the Margarita root which is a partition /Volumes/Data/www/margarita running on Yosemite.

I've noticed after a reboot the LaunchDaemon is creating the folder /Volumes/Data/www/margarita causing my volume to mount to /Volumes/Data 1/www/margarita

I am guessing the daemon is running before the mount point is ready. Anyone else seen this behaviour?

jessepeterson commented 9 years ago

Is this an OS X client or server install? I believe OS X client won't (or at least used to not) mount volumes until a user logged in (and likewise unmounted volumes upon user logout). Mac OS X Server on the other hand would mount volumes upon boot. However launchd daemons start immediately regardless of external volumes.

Forgot to add: because of this this may not be a Margarita-specific issue, but rather a general OS X/launchd issue.

cgerke commented 9 years ago

Client.

Going to try:

sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true

or just leave the logs where they are.

On Mon Feb 09 2015 at 12:26:29 PM Jesse Peterson notifications@github.com wrote:

Is this an OS X client or server install? I believe OS X client won't (or at least used to not) mount volumes until a user logged in (and likewise unmounted volumes upon user logout). Mac OS X Server on the other hand would mount volumes upon boot. However launchd daemons start immediately regardless of external volumes.

— Reply to this email directly or view it on GitHub https://github.com/jessepeterson/margarita/issues/28#issuecomment-73445464 .

jessepeterson commented 9 years ago

Sounds good. I'm interested in how the autodiskmount pref goes for you.

cgerke commented 9 years ago

Need to test this some more, its actually the internal disk that has been partitioned to: /System /Data

So I don't think autodiskmount is relevant here, I opened ssh session to the system and /Data is already getting mounted prior to the loginwindow, it just seems that your daemon is creating /Volumes/Data before the partition gets mounted there.

Going to test StartInterval or maybe WatchPath to see if it can delay the daemon.

This is Yosemite 10.10.2 BTW

cgerke commented 9 years ago

Only way I can get it working is to remove the StandardOutPath and StandardErrorPath, add a KeepAlive Pathstate to check for the volume, pipe the margarita.py to the log file. But now that I think about it, it was kinda dumb for me to want to store the log file in the www root anyway. I will leave it in /var/log

jessepeterson commented 9 years ago

Okay. Either way it seems it's more related to OS X and the nature launchd execution order than anything Margarita is doing. In other words any other software would also have this same issue. I'll close this issue. Thanks!