[Unit]
Description=Bind mount volatile /etc/stunnel.conf
DefaultDependencies=false
Before=local-fs.target
RequiresMountsFor=/tmp /etc
ConditionPathIsReadWrite=/tmp
ConditionPathExists=/etc/stunnel.conf
ConditionPathIsReadWrite=!/etc/stunnel.conf

[Service]
Type=oneshot
RemainAfterExit=Yes
StandardOutput=syslog
TimeoutSec=0
ExecStart=/sbin/mount-copybind /tmp/stunnel.conf /etc/stunnel.conf
ExecStop=/bin/umount /etc/stunnel.conf

[Install]
WantedBy=local-fs.target
