Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 2021 08:37:03 -0500
From:      "James B. Byrne" <byrnejb@harte-lyne.ca>
To:        "Polytropon" <freebsd@edvax.de>, freebsd-questions@freebsd.org
Subject:   Re: Need help specifying args in rc.conf for a service
Message-ID:  <a6a267103c261968bc5be218c00c0f0c.squirrel@webmail.harte-lyne.ca>
In-Reply-To: <X/4yYW1cZcaWEEC5@thismonkey.com>
References:  <mailman.68.1610452801.64653.freebsd-questions@freebsd.org> <74ebbde2ed354c37fc2a84cbf3e36840.squirrel@webmail.harte-lyne.ca> <X/4yYW1cZcaWEEC5@thismonkey.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help


On Tue, January 12, 2021 18:36, Scott wrote:
> On Tue, Jan 12, 2021 at 09:35:58AM -0500, James B. Byrne wrote:
>>
>>
>> On Mon, January 11, 2021 07:55, Scott wrote:
>> >
>> > here's what I get using:
>> >         node_exporter_args='--collector.filesystem.ignored-mount-points="^/(dev)($|/)"'
>> >
>> > + _doit=$' limits -C daemon su -m nobody -c \'sh -c "/usr/sbin/daemon  -f
>> -p
>> > /var/run/node_exporter.pid -T node_exporter     /usr/bin/env
>> > /usr/local/bin/node_exporter     --web.listen-address=:9100
>> > --collector.textfile.directory=/var/tmp/node_exporter
>> > --collector.filesystem.ignored-mount-points="^/(dev)($|/)""\''
>> > + _run_rc_doit $' limits -C daemon su -m nobody -c \'sh -c
>> "/usr/sbin/daemon
>> > -f -p /var/run/node_exporter.pid -T node_exporter     /usr/bin/env
>> > /usr/local/bin/node_exporter     --web.listen-address=:9100
>> > --collector.textfile.directory=/var/tmp/node_exporter
>> > --collector.filesystem.ignored-mount-points="^/(dev)($|/)""\''
>> > + debug $'run_rc_command: doit:  limits -C daemon su -m nobody -c \'sh -c
>> > "/usr/sbin/daemon  -f -p /var/run/node_exporter.pid -T node_exporter
>> > /usr/bin/env /usr/local/bin/node_exporter     --web.listen-address=:9100
>> > --collector.textfile.directory=/var/tmp/node_exporter
>> > --collector.filesystem.ignored-mount-points="^/(dev)($|/)""\''
>> > + eval $' limits -C daemon su -m nobody -c \'sh -c "/usr/sbin/daemon  -f -p
>> > /var/run/node_exporter.pid -T node_exporter     /usr/bin/env
>> > /usr/local/bin/node_exporter     --web.listen-address=:9100
>> > --collector.textfile.directory=/var/tmp/node_exporter
>> > --collector.filesystem.ignored-mount-points="^/(dev)($|/)""\''
>> > + limits -C daemon su -m nobody -c 'sh -c "/usr/sbin/daemon  -f -p
>> > /var/run/node_exporter.pid -T node_exporter     /usr/bin/env
>> > /usr/local/bin/node_exporter     --web.listen-address=:9100
>> > --collector.textfile.directory=/var/tmp/node_exporter
>> > --collector.filesystem.ignored-mount-points="^/(dev)($|/)""'
>> > Illegal variable name.
>> >
>> > Thanks
>> >
>> >
>>
>> Try escaping the '$' character (\$).
>>
>>
>> node_exporter_args='--collector.filesystem.ignored-mount-points="^/(dev)(\$|/)"'
>>
>> --
>> ***          e-Mail is NOT a SECURE channel          ***
>>         Do NOT transmit sensitive data via e-Mail
>>    Unencrypted messages have no legal claim to privacy
>>  Do NOT open attachments nor follow links sent by e-Mail
>>
>> James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
>> Harte & Lyne Limited          http://www.harte-lyne.ca
>> 9 Brockley Drive              vox: +1 905 561 1241
>> Hamilton, Ontario             fax: +1 905 561 0757
>> Canada  L8E 3C3
>>
>
> No joy:
>
> + _doit=$' limits -C daemon su -m nobody -c \'sh -c "/usr/sbin/daemon  -f -p
> /var/run/node_exporter.pid -T node_exporter     /usr/bin/env
> /usr/local/bin/node_exporter     --web.listen-address=:9100
> --collector.textfile.directory=/var/tmp/node_exporter
> --collector.filesystem.ignored-mount-points="^/(dev)(\\$|/)""\''
> + _run_rc_doit $' limits -C daemon su -m nobody -c \'sh -c "/usr/sbin/daemon
> -f -p /var/run/node_exporter.pid -T node_exporter     /usr/bin/env
> /usr/local/bin/node_exporter     --web.listen-address=:9100
> --collector.textfile.directory=/var/tmp/node_exporter
> --collector.filesystem.ignored-mount-points="^/(dev)(\\$|/)""\''
> + debug $'run_rc_command: doit:  limits -C daemon su -m nobody -c \'sh -c
> "/usr/sbin/daemon  -f -p /var/run/node_exporter.pid -T node_exporter
> /usr/bin/env /usr/local/bin/node_exporter     --web.listen-address=:9100
> --collector.textfile.directory=/var/tmp/node_exporter
> --collector.filesystem.ignored-mount-points="^/(dev)(\\$|/)""\''
> + eval $' limits -C daemon su -m nobody -c \'sh -c "/usr/sbin/daemon  -f -p
> /var/run/node_exporter.pid -T node_exporter     /usr/bin/env
> /usr/local/bin/node_exporter     --web.listen-address=:9100
> --collector.textfile.directory=/var/tmp/node_exporter
> --collector.filesystem.ignored-mount-points="^/(dev)(\\$|/)""\''
> + limits -C daemon su -m nobody -c 'sh -c "/usr/sbin/daemon  -f -p
> /var/run/node_exporter.pid -T node_exporter     /usr/bin/env
> /usr/local/bin/node_exporter     --web.listen-address=:9100
> --collector.textfile.directory=/var/tmp/node_exporter
> --collector.filesystem.ignored-mount-points="^/(dev)(\$|/)""'
> Badly placed (.
>
> Cheers
>
. . .
--collector.filesystem.ignored-mount-points="^/(dev)(\\$|/)""\''
. . .
--collector.filesystem.ignored-mount-points="^/(dev)(\\$|/)""\''

VICE

. . .
--collector.filesystem.ignored-mount-points="^/(dev)(\$|/)""'

Why is the last different than the first two?



Is the first

-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
   Unencrypted messages have no legal claim to privacy
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?a6a267103c261968bc5be218c00c0f0c.squirrel>