#!/bin/sh -e

# Service setup script for Alpine Wall on Alpine Linux
# Copyright (C) 2018-2019 Kaarle Ritvanen

SRV=$1

set_param() {
	sed -Ei "s/^($1=).*\$/\\1$2/" /etc/conf.d/$SRV
}

set_param SAVE_ON_STOP no
if [ "$FORWARD" != no ]; then
	set_param IPFORWARD yes
fi

rc-update add $SRV
service $SRV start
