#!/ffp/bin/sh

# PROVIDE: apache-webdav

. /ffp/etc/ffp.subr

name="apache-webdav"
start_cmd="apache_start"
stop_cmd="apache_stop"
status_cmd="apache_status"

apache_start() {
    chown root:www-data /ffp/apache/pwdb/ -R; chmod 770 /ffp/apache/pwdb/ -R
    /ffp/sbin/useradd www-root
    /ffp/sbin/groupadd www-data
    /ffp/sbin/usermod -aG www-data www-root
    echo "Az apache inditasa folyamatban van..."
    /ffp/bin/apachectl start
    echo "Kesz!"
}

apache_stop() {
    echo "Apache leallitasa..."
    /ffp/bin/apachectl stop
    echo "Kesz!"
}

apache_status() {
    proc_status /ffp/bin/httpd
}

run_rc_command "$1"