add local config option
This commit is contained in:
parent
18e78a444a
commit
8bf288e2c7
|
@ -10,13 +10,21 @@ if [ "$USER" != "root" ]; then
|
||||||
exec sudo $0
|
exec sudo $0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# create empty virtualhostExclusionArray array (any domains added to this array will be skipped)
|
||||||
declare -a virtualhostExclusionArray
|
declare -a virtualhostExclusionArray
|
||||||
# optionally add virtualhosts to virtualhostExclusionArray to have them skipped
|
|
||||||
|
|
||||||
# create virtualhostArray
|
# create virtualhostArray listing all virtualhost on the server
|
||||||
cd /srv/www
|
cd /srv/www
|
||||||
virtualhostArray=(`ls -1|grep -v ^html$`)
|
virtualhostArray=(`ls -1|grep -v ^html$`)
|
||||||
|
|
||||||
|
# check for local config, which can be used to override either of the above arrays
|
||||||
|
if [[ -f /usr/local/etc/wp-cron.conf ]]; then
|
||||||
|
source /usr/local/etc/wp-cron.conf
|
||||||
|
# conf file could contain either one or both arrays, configured like this:
|
||||||
|
#virtualhostArray=("example.com" "example.net")
|
||||||
|
#virtualhostExclusionArray=("example.org")
|
||||||
|
fi
|
||||||
|
|
||||||
for VHOST in "${virtualhostArray[@]}"
|
for VHOST in "${virtualhostArray[@]}"
|
||||||
do
|
do
|
||||||
# check if VHOST has been added to exclustion array
|
# check if VHOST has been added to exclustion array
|
||||||
|
|
Loading…
Reference in New Issue
Block a user