On Tue, Mar 02, 2021 at 01:33:28PM +0200, Peter Pentchev wrote:
On Tue, Mar 02, 2021 at 12:14:08PM +0100, simona vittori wrote:
Hello, I have 2 stunnel instance on a server and I have to insert all 2 in systemd. How to do that? Is it possible to create 2 stunnel.service naming different, for example stunnel.service and stunnel1.service where insert the script to start at boot of the machine?
Recently I made a change to the Debian stunnel package that introduced the stunnel@.service instanced units at both system- and user-level. Can you try placing the two attached files - stunnel@.service and stunnel.target - into the /etc/systemd/system/ directory, running `systemctl daemon-reload`, and then starting and, if it works, enabling 'stunnel@somename.service', where 'somename' is the name of an /etc/stunnel/somename.conf file? This allows you a bit more fine-grained control: put several definitions in several config files in the /etc/stunnel/ directory, only enable some of them at boot time, start and stop others as needed.
Ahh... I forgot to mention that in order for this to work as a Type=simple systemd service, the stunnel configuration ought to set `foreground = yes`.
G'luck, Peter