On 04/03/2016 23:15, Jan Olszak wrote:
But what if I need to fallback if the arguments are malformed?
I'd argue this is not a good idea.
Arguments to a logging script are not user data, they are admin-controlled
data that impacts the working of your system. They should be validated
before you
But what if I need to fallback if the arguments are malformed?
So something like - if some operation fails run another command, but if it
succeeds exit.
On Fri, Mar 4, 2016 at 11:06 PM, Jan Olszak
wrote:
> And this works perfectly.
> I missed the -D option in backtick. :)
>
> Yeah, /opt was ju
And this works perfectly.
I missed the -D option in backtick. :)
Yeah, /opt was just an example.
Thanks!
On Thu, Mar 3, 2016 at 2:09 AM, Laurent Bercot
wrote:
> On 02/03/2016 23:52, Jan Olszak wrote:
>
>> #!/usr/bin/execlineb -P
>> if -nt
>> {
>>backtick -n S6_LOG_ARGS
>> {
>>
On 02/03/2016 23:52, Jan Olszak wrote:
#!/usr/bin/execlineb -P
if -nt
{
backtick -n S6_LOG_ARGS
{
redirfd -r 0 /opt/s6logargs.opts s6-cat
}
import -u S6_LOG_ARGS s6-log T $S6_LOG_ARGS
}
s6-log T s100 n10 /var/log/syslogd
That won't work for several reasons:
* the
Hi!
Could anybody help me with a small script in execline. I'm a complete newbe.
It's supposed to run s6-log with arguments loaded from a file.
If there's no file it's falls back to default arguments.
So far I have something like that, but it always runs the default:
s6-log T s100 n10 /var/l