On Sun, Jun 25, 2023 at 11:06:17AM +0200, Francesco P. Lovergine wrote:

Why not use an ExecStartPre= or ExecCondition= in your normal units to
prevent starting when in inetd mode?


Unfortunately, Exec* directives can only be used in .service units. That's the reason to enable an external oneshot .service unit to start alternatively one of the two other units. Ideally one day or another such features could be available also in other type of units (there is an issue open since 2019). Incidentally, it is possible to add a ConditionPathExists and a something like /etc/proftpd/proftpd_not_to_be_run (which is the trick used in sshd) but would be completely Debian specific and out of the usual workflow to manage inetd/standalone modes in proftpd. So, I'm not that keen on
this kind of trick.


Even, the ConditionPathExists would also imply adding code to
manage in postinst that kind of stuff, in order to update
admin's configuration in a proper way to respect the rule of least
surprise at upgrade time ...


--
Francesco P. Lovergine

Reply via email to