PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /proc/thread-self/root/bin/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //proc/thread-self/root/bin/libcare-cron

#!/usr/bin/bash
# vi:syntax=sh

set -eo pipefail


progname=$(basename "$0")

sub_help(){
    echo "Usage: $progname <subcommand> [options]\n"
    echo "Subcommands:"
    echo "    init"
    echo "    disable"
    echo ""
    echo "For help with each subcommand run:"
    echo "$progname <subcommand> -h|--help"
    echo ""
}

LIBCARE_CRONFILE=/etc/cron.d/libcare-cron

subcommand=$1

sub_disable(){
    if [[ -e ${LIBCARE_CRONFILE} && -s ${LIBCARE_CRONFILE} ]]; then
        rm ${LIBCARE_CRONFILE}
    fi
}

sub_init(){
    if ! [[ -e ${LIBCARE_CRONFILE} && -s ${LIBCARE_CRONFILE} ]]; then
      echo "$(( RANDOM % 60 )) */4  * * * root /usr/bin/kcarectl -q --lib-auto-update" > ${LIBCARE_CRONFILE}
    fi
}


case $subcommand in
    "" | "-h" | "--help")
        sub_help
        ;;
    *)
        shift
        sub_${subcommand} $@
        if [ $? = 127 ]; then
            echo "Error: '$subcommand' is not a known subcommand." >&2
            echo "       Run '$progname --help' for a list of known subcommands." >&2
            exit 1
        fi
        ;;
esac

echo "Done."