#!/sbin/openrc-run

depend() {
	need net
	after firewall
}

start() {
	ebegin "Starting terraform-http-backend"
	source /etc/conf.d/terraform-http-backend || eend 1
	su "$TF_USER" -c "/opt/sbin/terraform-http-backend &" || eend 1
	eend $?
}

stop() {
	ebegin "Stopping terraform-http-backend"
	busybox killall -TERM terraform-http-backend
	eend $?
}
