Skribent: Harald Arnesen
Dato:
Til: dng
Emne: Re: [DNG] Creating directory in /var/run on bootup
Rowland Penny via Dng [05/02/2019 21.59]:
>> I think you meant to write:
>>
>> if [ ! -d /var/run/barman ]; then mkdir -p /var/run/barman; fi
>>
>
> even better:
>
> [[ -d /var/run/barman ]] || mkdir -p /var/run/barman
Or even simpler:
mkdir -p /var/run/barman
If the directory or any of its parents does not exist, it is created.
Otherwise, the command just returns without any output.
--
Hilsen Harald