wordpress-tools/install.sh

28 lines
749 B
Bash
Raw Normal View History

2021-04-14 12:10:42 -07:00
#!/bin/bash
if [ "${EUID}" -ne 0 ]; then
echo "You must be root to run this installer."
exit
fi
# download & install wp-cli
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
# configure wp-cli bash completion
cp bash_completion.d/wp-cli /etc/bash_completion.d/
chmod 644 /etc/bash_completion.d/wp-cli
# install wp user scripts
cp bin/wp-* /usr/local/bin
2021-04-15 12:50:06 -07:00
chmod 755 /usr/local/bin/wp-*
2021-04-14 12:10:42 -07:00
# install & enable wp systemd cron
cp sbin/wp-cron.sh /usr/local/sbin/
chmod 755 /usr/local/sbin/wp-cron.sh
cp systemd/wp-cron.* /usr/lib/systemd/system/
chmod 644 /usr/lib/systemd/system/wp-cron.*
2022-03-28 09:50:13 -07:00
systemctl enable wp-cron.timer
2021-04-14 12:10:42 -07:00
systemctl start wp-cron.timer