danb35 / freenas-iocage-nextcloud

Script to create an iocage jail on FreeNAS for the latest Nextcloud 28 release, including Caddy, MariaDB or PostgreSQL, and Let's Encrypt
GNU General Public License v3.0
258 stars 70 forks source link

Direct stdout and stderr to /var/log/caddy.log. #127

Closed basilhendroff closed 4 years ago

basilhendroff commented 4 years ago

More information at https://caddy.community/t/how-to-use-the-expanded-form-of-php-fastcgi/9228/1

danb35 commented 4 years ago

Interesting. Definitely a good move to use the $pidfile variable in the start command (what else was the point of defining it in the first place?). But I think I like having the Caddy log location configurable, as it was in the v1 rc script.

Can you explain why you've changed start_cmd from a one-line definition into a function?

basilhendroff commented 4 years ago

Interesting. Definitely a good move to use the $pidfile variable in the start command (what else was the point of defining it in the first place?). But I think I like having the Caddy log location configurable, as it was in the v1 rc script.

Can you explain why you've changed start_cmd from a one-line definition into a function?

Only because I couldn't get the one-line version working, but in the back of my mind, I also had the idea that a 'verbose mode' might be a good idea. As it is, console spam is now gone, but a verbose mode would bring it back. This could be useful. Thinking about how I might suggest this for the official script.

danb35 commented 4 years ago

Only because I couldn't get the one-line version working

I should probably actually test mine, then. It should work, but...

I also had the idea that a 'verbose mode' might be a good idea

How do you see this working? Setting a rc.conf option that would put all the log output back on the console?

danb35 commented 4 years ago

Thanks for the PR, but took care of this slightly differently.