Mini Shell

Direktori : /usr/share/cloudlinux/
Upload File :
Current File : //usr/share/cloudlinux/add_clwpos_crons.sh

#!/usr/bin/bash

# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2021 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT

[[ -z "$CLSHARE" ]] && exit 1

[[ -n "$WPOS_REQ_CRON_FILE" ]] &&
    echo "*/10 * * * * root /usr/bin/flock -n /var/run/cloudlinux_wpos_generate.cronlock ${CLSHARE}/clwposcron &> /dev/null" > "${WPOS_REQ_CRON_FILE}"
[[ -n "$CLWPOS_REDIS_EXTENSION_INSTALLER" ]] &&
    echo "$(( RANDOM % 60 )) $(( RANDOM % 24 ))  * * * root /usr/sbin/enable_redis_for_panel_php &> /dev/null" > "${CLWPOS_REDIS_EXTENSION_INSTALLER}" &&
    echo "$(( RANDOM % 60 )) $(( RANDOM % 24 ))  * * * root /usr/share/cloudlinux/wpos/enable_redis_for_alt_php.py &> /dev/null" >> "${CLWPOS_REDIS_EXTENSION_INSTALLER}"
[[ -n "$CLWPOS_CLEANER_CRON" ]] &&
    echo "*/15 * * * * root ${CLSHARE}/wpos/redis_configuration_pid_file_cleaner.py &> /dev/null" > "${CLWPOS_CLEANER_CRON}"
[[ -n "$CLWPOS_COLLECT_INFORMATION_CRON" ]] &&
    echo "0 0 * * * root /usr/sbin/clwpos_collect_information.py &> /dev/null" > "${CLWPOS_COLLECT_INFORMATION_CRON}"
[[ -n "$CLWPOS_BILLING_CRON" ]] &&
    echo "$(( RANDOM % 60 )) $(( RANDOM % 24 )) * * * root /usr/bin/cloudlinux-awp-admin cln-sync &> /dev/null" > "${CLWPOS_BILLING_CRON}" &&
    echo "$(( RANDOM % 60 )) $(( RANDOM % 24 )) * * * root /usr/bin/cloudlinux-awp-admin billing-check &> /dev/null" >> "${CLWPOS_BILLING_CRON}"

Zerion Mini Shell 1.0