:: Re: [DNG] Creating directory in /va…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Harald Arnesen
日付:  
To: dng
題目: 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