#!/bin/execlineb -P
foreground { 
	if -t -n { test -f /etc/stunnel/stunnel.conf }
	foreground { cp /etc/stunnel/stunnel.conf-sample /etc/stunnel/stunnel.conf }
	foreground { sh -c "sed -i 's/;setuid/setuid/' /etc/stunnel/stunnel.conf" }
	foreground { sh -c "sed -i 's/;setgid/setgid/' /etc/stunnel/stunnel.conf" }
	foreground { sh -c "sed -i 's/;foreground/foreground/' /etc/stunnel/stunnel.conf" }
}
fdmove -c 2 1 exec stunnel
