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 [email protected] instanced units at both system- and user-level. Can you try placing the two attached files - [email protected] and stunnel.target - into the /etc/systemd/system/ directory, running `systemctl daemon-reload`, and then starting and, if it works, enabling '[email protected]', 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. Also attached is an [email protected] file that should be installed as [email protected] in the /etc/systemd/user/ directory; it allows a user to start their own instances of stunnel, configured via files in the ~/.config/stunnel/ directory. Of course, the /etc/systemd/system/ and /etc/systemd/user/ paths above are meant to represent systemd unit files installed by hand by a sysadmin on a particular server; if these are installed by some kind of package, they should be placed in other directories. I'd be very glad for any feedback. G'luck, Peter -- Peter Pentchev [email protected] [email protected] [email protected] PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
[Unit] Description=TLS tunnels for network services - per-config-file target [Install] WantedBy=multi-user.target
[Unit] Description=TLS tunnel for network daemons - per-config-file service Documentation=man:stunnel(8) PartOf=stunnel.target [Service] ExecStart=/usr/bin/stunnel /etc/stunnel/%i.conf PrivateTmp=yes [Install] WantedBy=multi-user.target
[Unit] Description=TLS tunnel for network daemons - per-config-file user service Documentation=man:stunnel(8) [Service] ExecStart=/usr/bin/stunnel %h/.config/stunnel/%i.conf PrivateTmp=yes [Install] WantedBy=default.target
signature.asc
Description: PGP signature
_______________________________________________ stunnel-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
