Compare commits
No commits in common. "2240487a9a71feb750bec8bba8860622b5f9a012" and "20891b07d08aa8b593c0dd4da1246f6f5c440835" have entirely different histories.
2240487a9a
...
20891b07d0
|
@ -15,8 +15,8 @@ cp bash_completion.d/wp-cli /etc/bash_completion.d/
|
||||||
chmod 644 /etc/bash_completion.d/wp-cli
|
chmod 644 /etc/bash_completion.d/wp-cli
|
||||||
|
|
||||||
# install wp user scripts
|
# install wp user scripts
|
||||||
cp bin/wp-* /usr/local/bin
|
|
||||||
chmod 755 /usr/local/bin/wp-*
|
chmod 755 /usr/local/bin/wp-*
|
||||||
|
cp bin/wp-* /usr/local/bin
|
||||||
|
|
||||||
# install & enable wp systemd cron
|
# install & enable wp systemd cron
|
||||||
cp sbin/wp-cron.sh /usr/local/sbin/
|
cp sbin/wp-cron.sh /usr/local/sbin/
|
||||||
|
|
56
update.sh
56
update.sh
|
@ -3,16 +3,6 @@
|
||||||
# update repo
|
# update repo
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
# update wp-cli
|
|
||||||
if [ -f /usr/local/bin/wp ]; then
|
|
||||||
/usr/local/bin/wp cli update --yes --quiet --allow-root
|
|
||||||
else
|
|
||||||
# wp-cli not found, download & install
|
|
||||||
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
|
||||||
sudo mv wp-cli.phar /usr/local/bin/wp
|
|
||||||
chmod +x /usr/local/bin/wp
|
|
||||||
if
|
|
||||||
|
|
||||||
# update scripts in bin
|
# update scripts in bin
|
||||||
chmod 755 bin/*
|
chmod 755 bin/*
|
||||||
readarray -t bin_script_array < <(ls -1 bin/)
|
readarray -t bin_script_array < <(ls -1 bin/)
|
||||||
|
@ -30,32 +20,28 @@ for bin_script in "${bin_script_array[@]}"; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# check bash completion config for update
|
# check etc configs for diffs
|
||||||
if ! diff -q bash_completion.d/wp-cli /etc/bash_completion.d/wp-cli ; then
|
readarray -t etc_configs_array < <(find etc/ -type f)
|
||||||
cp bash_completion.d/wp-cli /etc/bash_completion.d/wp-cli
|
for etc_config in "${etc_configs_array[@]}"; do
|
||||||
chmod 644 /etc/bash_completion.d/wp-cli
|
if [ -f /$etc_config ]; then
|
||||||
echo "bash completion config updated"
|
if ! diff -q $etc_config /$etc_config ; then
|
||||||
|
echo To update run:
|
||||||
|
echo diff $etc_config /$etc_config
|
||||||
|
echo cp $etc_config /$etc_config
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "Adding new config file /$etc_config"
|
||||||
|
cp $etc_config /$etc_config
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# check wp-cron.sh for update
|
# update libexec script
|
||||||
if ! diff -q sbin/wp-cron.sh /usr/local/sbin/wp-cron.sh ; then
|
if ! diff -q libexec/vmail-quota-warning.sh /usr/libexec/vmail-quota-warning.sh ; then
|
||||||
cp sbin/wp-cron.sh /usr/local/sbin/wp-cron.sh
|
cp libexec/vmail-quota-warning.sh /usr/libexec/vmail-quota-warning.sh
|
||||||
chmod 755 /etc/bash_completion.d/wp-cli
|
chmod 750 /usr/libexec/vmail-quota-warning.sh
|
||||||
echo "sbin/wp-cron.sh updated"
|
chown dovecot:mail /usr/libexec/vmail-quota-warning.sh
|
||||||
echo
|
echo "/usr/libexec/vmail-quota-warning.sh updated"
|
||||||
fi
|
|
||||||
|
|
||||||
# check systemd timer for update
|
|
||||||
if ! diff -q systemd/wp-cron.service /usr/lib/systemd/system/wp-cron.service ; then
|
|
||||||
cp systemd/wp-cron.service /usr/lib/systemd/system/wp-cron.service
|
|
||||||
chmod 644 /usr/lib/systemd/system/wp-cron.service
|
|
||||||
echo "systemd/wp-cron.service updated"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
if ! diff -q systemd/wp-cron.timer /usr/lib/systemd/system/wp-cron.timer ; then
|
|
||||||
cp systemd/wp-cron.timer /usr/lib/systemd/system/wp-cron.timer
|
|
||||||
chmod 644 /usr/lib/systemd/system/wp-cron.timer
|
|
||||||
echo "systemd/wp-cron.timer updated"
|
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user