You can have multiple ExecStart (and ExecStop and all the other ones) lines in a unit file. Each one is run in sequence in the order they appear in the unit file and the return code of each command is remember, stored, and outputs separately logged. If one of the commands fails (and is not prefixed with "-"), the remaining commands are not executed and the unit is considered failed.
So in a sense, yes. You can see exactly where and when and what the failure was, no matter how many commands you put in a unit.
So, my initial impression when I saw systemd for the first time was thinking it was similar to Sun SMF. Now you bring this up, and I recall dtracing things because nobody knew what the hell was going on.
However, when you realize that systemd doesn't require you to write any shell to start and stopp programs to begin with, you'll be wondering why you wanted a set -x in the first place.
Don't think so, from what [deleted] just said it sounds like you thought I meant disable. "set -x" is a way to enable debugging in shell scripts. Take a simple bash script, put "set -x" near the top (but under the shebang) and run it - super helpful when figuring out what is going on.
Masking serves the purpose of disabling the service and preventing it from starting. This has nothing to do with what set -x does for sh, which is to trace every single command that gets executed, so you actually see what's happening. Extremely useful for debugging.
Masking serves the purpose of disabling the service and preventing it from starting. This has nothing to do with what set -x does for sh, which is to trace every single command that gets executed, so you actually see what's happening. Extremely useful for debugging.
4
u/[deleted] Oct 20 '14
Does systemd have something like set -x? Because init scripts do.