Anton Aylward wrote:
Joachim Schrod said the following on 04/24/2013 08:03 PM:
But, OTH, if I have a distribution-specific systemd unit definition, what's the difference between an chown and a script that does both mkdir and chown?
A big difference. First you have to write the script. Second you have to set up the .service to create a shell to execute it.
I wouldn't consider both to be a hazzle. We're talking about a script with 2-3 lines here. And an additional call to a shell won't bother me at all -- you'll have to look at the stuff a Java application server is doing at startup to realize that this would be premature optimization.
Using the tow "Pre" avoids both of those.
Ooops, totally black hole of mine. Thanks; didn't get that you meant to propose putting both commands (mkdir and chown) in the service file. That's better from a maintenance point of view; I'll use that.
In maintenance terms, it's cheaper.
I disagree.
Where is the script going to live? Where is the documentation for it going to be?
Sorry, but I have to note that -- while I follow your recommendation, it's not due to these reasons. -- Where the script is going to live? Well that would be easy: -- Development phase: At the source repository that has the systemd service definition, too. We need to control and manage files that are external to the software distribution anyhow, one more wouldn't matter from a management perspective. -- Deployment phase: In /opt, where the Tomcat server lives. (Installation managed by Puppet, FWIW.) Thus, not a problem at all. -- Its documentation? Inline, as POD. As with all our scripts, man pages on the cheap. Thanks <insert your favorite deity> for ": <<'=cut'" :-) What convinced me to follow your recommendation was not these two (non-)issues -- but the ability to have one file less in general, a file that doesn't bring any abstraction to the table. That's a clear modularization and thus maintenance advantage. Cheers and thanks for the hint, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org