YunoHost-Apps / Experimental_helpers

6 stars 12 forks source link

[fix] Reloading of fail2ban #11

Closed Rafi594 closed 6 years ago

Rafi594 commented 6 years ago

Hello

To update the fail2ban jails the systemctl restart fail2ban command is not the right one because you have to restart fail2ban-client which manages the jails.

maniackcrudelis commented 6 years ago

Is there any differences ?

alexAubin commented 6 years ago

(Bump ?)

JimboJoe commented 6 years ago

If you look in fail2ban systemd service definition, it uses fail2ban-client start/stop/reload, so I advise to keep systemctl. Anyway, I've tried and tested if reload could be enough instead of restart and... it is! :+1:

maniackcrudelis commented 6 years ago

Anyway, I've tried and tested if reload could be enough instead of restart and... it is! +1

Are you sure about that ? I just tried this helper and I got this error:

Failed to reload fail2ban.service: Job type reload is not applicable for unit fail2ban.service.

If I try sudo systemctl reload fail2ban I get Failed to reload fail2ban.service: Job type reload is not applicable for unit fail2ban.service., if I try sudo systemctl restart fail2ban, no problem.

JimboJoe commented 6 years ago

Nice, it only works... on Stretch :sweat_smile:

maniackcrudelis commented 6 years ago

I didn't say the S word, but I was quite sure about it... It works fine with restart. At least it seems to work, I have some errors with my restoration, maybe not relative to this.