:: Re: [DNG] Creating directory in /va…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Alessandro Selli
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] Creating directory in /var/run on bootup
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


[...]


> . check which init.d script which sets up /var/run and which starts
> cron, and add a script that starts somewhere between thoose two that
> sets up /var/run/barman



  I would prefer such a solution,  as it would take away the check for
the presence of /var/run/barman every darn minute.

/etc/rc.local would be a place I'd think to put the directory creation,
too, as it's unlikely that a minute passes between cron startup and it's
execution.  But putting an ad hoc script is the best thing.



--
Alessandro Selli <alessandroselli@???>
VOIP SIP: dhatarattha@???
Chiave firma e cifratura PGP/GPG signing and encoding key:
BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE