installer
This commit is contained in:
parent
4de105a2dd
commit
fce2194f7e
13
README.md
13
README.md
|
@ -12,16 +12,5 @@ wp-installer.sh automated wp installer
|
|||
cd /usr/local/src
|
||||
git clone https://git.stack-source.com/msb/wordpress-tools.git
|
||||
cd wordpress-tools
|
||||
cp bash_completion.d/wp-cli /etc/bash_completion.d/
|
||||
chmod 644 /etc/bash_completion.d/wp-cli
|
||||
chmod 755 /usr/local/bin/wp-*
|
||||
cp bin/wp-* /usr/local/bin
|
||||
|
||||
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.*
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl start wp-cron.timer
|
||||
bash install.sh
|
||||
```
|
||||
|
|
27
install.sh
Executable file
27
install.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/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
|
||||
chmod 755 /usr/local/bin/wp-*
|
||||
cp bin/wp-* /usr/local/bin
|
||||
|
||||
# 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.*
|
||||
systemctl daemon-reload
|
||||
systemctl start wp-cron.timer
|
Loading…
Reference in New Issue
Block a user