:: Re: [DNG] Creating directory in /va…
Inizio della pagina
Delete this message
Reply to this message
Autore: Rowland Penny
Data:  
To: dng
Oggetto: Re: [DNG] Creating directory in /var/run on bootup
On Tue, 5 Feb 2019 21:31:46 +0100
Alessandro Selli <alessandroselli@???> wrote:

> On 05/02/19 at 11:34, karl@??? wrote:
> > Tom:
> > ...
> >> What is the recommended alternative way to create a sub-directory
> >> of /var/run on bootup for non-daemon software?
> > Don't know about "recommended", but you can
> >
> > . prepend your cron script like (or have a wrapper):
> >
> > if [ ! -d / ]; then mkdir -p /var/run/barman; fi
> > <rest of cron script>
>
>
>   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

Rowland