You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(wpst-goaccess): Fixed detection of gzip files
improvement(cron-shim): Updated cron-shim.sh to use cron-shim.conf
fix(cron-shim): Removed skipping plugins and themes as this will cause tasks not to run.
SCRIPT_DIR=$(dirname "$(realpath "$0")")# - Directory of this script
18
-
WP_CLI="/usr/local/bin/wp"# - Location of wp-cli
19
-
WP_ROOT=""# - Path to WordPress, blank will try common directories.
20
-
CRON_CMD="$WP_CLI --skip-plugins --skip-themes cron event run --due-now"# - Command to run
21
-
HEARTBEAT_URL=""# - Heartbeat monitoring URL, example https://uptime.betterstack.com/api/v1/heartbeat/23v123v123c12312 leave blank to disable or pass in via environment variable
22
-
POST_CRON_CMD=""# - Command to run after cron completes
23
-
24
-
# Logging
25
-
LOG_TO_STDOUT="1"# - Log to stdout? 0 = no, 1 = yes
26
-
LOG_TO_SYSLOG="1"# - Log to syslog? 0 = no, 1 = yes
27
-
LOG_TO_FILE="0"# - Log to file? 0 = no, 1 = yes
28
-
LOG_FILE=""# Location for WordPress cron log file if LOG_TO_FILE="1", if left blank then ${WP_ROOT}/../wordpress-crons.log"
18
+
19
+
# -- Check if cron-shim.conf exists and source it
20
+
if [[ -f$SCRIPT_DIR/cron-shim.conf ]];then
21
+
echo"Found and sourcing $SCRIPT_DIR/cron-shim.conf"
22
+
source$SCRIPT_DIR/cron-shim.conf
23
+
fi
24
+
25
+
# -- Default Settings
26
+
[[ -z$WP_CLI ]] && WP_CLI="/usr/local/bin/wp"# - Location of wp-cli
27
+
[[ -z$WP_ROOT ]] && WP_ROOT=""# - Path to WordPress, blank will try common directories.
28
+
[[ -z$CRON_CMD ]] && CRON_CMD="$WP_CLI cron event run --due-now"# - Command to run
29
+
[[ -z$HEARTBEAT_URL ]] && HEARTBEAT_URL=""# - Heartbeat monitoring URL, example https://uptime.betterstack.com/api/v1/heartbeat/23v123v123c12312 leave blank to disable or pass in via environment variable
30
+
[[ -z$POST_CRON_CMD ]] && POST_CRON_CMD=""# - Command to run after cron completes
31
+
32
+
# -- Logging Settings
33
+
[[ -z$LOG_TO_STDOUT ]] && LOG_TO_STDOUT="1"# - Log to stdout? 0 = no, 1 = yes
34
+
[[ -z$LOG_TO_SYSLOG ]] && LOG_TO_SYSLOG="1"# - Log to syslog? 0 = no, 1 = yes
35
+
[[ -z$LOG_TO_FILE ]] && LOG_TO_FILELOG_TO_FILE="0"# - Log to file? 0 = no, 1 = yes
36
+
[[ -z$LOG_FILE ]] && LOG_FILE=""# Location for WordPress cron log file if LOG_TO_FILE="1", if left blank then ${WP_ROOT}/../wordpress-crons.log"
0 commit comments