Welcome to kriss.run!


Back

install_tianji.sh

#!/usr/bin/env bash


# ======================================================================= #
#                           FUNCTION: Install                             #
# ======================================================================= #
__tianji_install() {
    curl -o- https://monit.roste.org/serverStatus/cm3ozhhk20001iek831xqkab9/install.sh?url=https://monit.roste.org | sudo bash
}

# ======================================================================= #
#                           FUNCTION: Uninstall                           #
# ======================================================================= #
__tianji_uninstall() {
    curl -o- https://monit.roste.org/serverStatus/cm3ozhhk20001iek831xqkab9/install.sh?url=https://monit.roste.org | sudo bash -s -- uninstall
}

# ======================================================================= #
#                           FUNCTION: Restart                             #
# ======================================================================= #
__tianji_restart() {
    curl -o- https://monit.roste.org/serverStatus/cm3ozhhk20001iek831xqkab9/install.sh?url=https://monit.roste.org | sudo bash -s -- reset_conf
}

# ======================================================================= #
#                           FUNCTION: Help                                #
# ======================================================================= #
__tianji_help() {
    echo "Usage: $0 [install|uninstall|restart]"
}

# ======================================================================= #
#                               MAIN                                     #
# ======================================================================= #
case $1 in
    install)
        __tianji_install
        ;;
    uninstall)
        __tianji_uninstall
        ;;
    restart)
        __tianji_restart
        ;;
    *)
        __tianji_help
        ;;
esac