#!/system/bin/sh

MODDIR=${0%/*}
# shellcheck disable=SC1090
. "$MODDIR/common.sh"

case "$1" in
    stop)
        log_note "server.sh stop invoked"
        stop_daemon
        ;;
    status)
        log_note "server.sh status invoked"
        status_daemon
        ;;
    start|"")
        log_note "server.sh start invoked"
        start_daemon
        ;;
    restart)
        log_note "server.sh restart invoked"
        stop_daemon
        start_daemon
        ;;
    *)
        log_note "usage: server.sh [start|stop|restart|status]"
        exit 1
        ;;
esac
