Re: How to use logrotate postrotate *bash* script
On Thu, 2013-12-05 at 10:31 +0100, Steffen Dettmer wrote:
> logrotate seems to execute "postrotate" scripts using /bin/sh and I
> found no way where to specify which script interpreter to use.
> Starting with a she-bang line seem to have no effect. Even if I
> manually run logrotate as root who has /bin/bash as login shell,
> /bin/sh is used.
>
> How to make logrotate to use the correct interpreter for "postrotate" scripts?
The Magic line is used, if you run it directly
myscript
using
sh myscript
dash myscript
bash myscript
will use the named bash. sh usually is a link to bash or dash. Sometimes
it's smart to write scripts that run with dash and bash.
Regards,
Ralf
Reply to: