Date: Thu, 8 Nov 2018 18:13:24 +0000 From: Carmel NY <carmel_ny@outlook.com> To: FreeBSD <freebsd-questions@freebsd.org> Subject: Append to "command" in rec script Message-ID: <SN1PR20MB2109DD8D5387A977F1F550B480C50@SN1PR20MB2109.namprd20.prod.outlook.com>
next in thread | raw e-mail | index | archive | help
I am attempting to create an "rc" script to start a program I am working on= . I want, if possible, for the user to enter something in the rc.conf file to= be added to the "command" string when the program is started. EXAMPLE: In the rc script, this is present command=3D/usr/local/bin/MyProg Now, suppose the user wanted to activate logging. They could modify the rc script and append an "-l" to the command string. However, I would rather th= ey entered options in the rc.conf file I have been trying to use something like this in the re.conf file: MyProg_append=3D"-l" is there a way to get the script to automatically append that to the "command" or would I have to use something like this: command=3D/usr/local/bin/MyProg ${MyProg_append} What happens if the variable is empty? Thanks! --=20 Carmel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?SN1PR20MB2109DD8D5387A977F1F550B480C50>