On Sat, Jan 2, 2016 at 1:57 PM, Reindl Harald wrote:
>
>
> Am 02.01.2016 um 13:43 schrieb arnaud gaboury:
>>
>> ExecStartPre=/usr/bin/rm -f ${REPORTDIR}/
>
>
> ExecStartPre=/usr/local/scripts/emptydir.sh $REPORTDIR
Thank you, but I would prefer to avoid any external script.
I finally found the c
Am 02.01.2016 um 13:43 schrieb arnaud gaboury:
ExecStartPre=/usr/bin/rm -f ${REPORTDIR}/
ExecStartPre=/usr/local/scripts/emptydir.sh $REPORTDIR
signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@list
On Sat, Jan 2, 2016 at 1:08 PM, Mantas Mikulėnas wrote:
> ExecStart does not go through a shell, so it won't expand wildcards.
OK. I understand now.
>
> Try running 'find /dir -mindepth 1 -delete', that also cleans up dotdirs.
In my case, there is one more hurdle. Will post elsewhere as it is OT
ExecStart does not go through a shell, so it won't expand wildcards.
Try running 'find /dir -mindepth 1 -delete', that also cleans up dotdirs.
Alternatively 'sh -c "rm .../*" to handle wildcards.
On Sat, Jan 2, 2016, 13:39 arnaud gaboury wrote:
> I can't manage to empty a directory as a Exec i
I can't manage to empty a directory as a Exec in a service file. Here is part:
---
[Service]
User=postgres
Environment=REPORTDIR=/storage/psqlReport
ExecStartPre=/usr/bin/rm -f ${REPORTDIR}/*
ExecStart=MyCommand
-