rearrange files into etc/ and local/ dirs
This commit is contained in:
parent
faf2012f7a
commit
538417f0e2
|
@ -6,6 +6,7 @@ A couple of handy tools for virtualhost servers with WordPress sites.
|
|||
- systemd cron for running wp crons. Individual sites don't have to set their own cron job or rely on lazy cron.
|
||||
- wp-create-db-user-from-config.sh extracts DB config info from wp-config.php, useful for creating dbs & users for sites that are being migrated.
|
||||
- wp-installer.sh for performing new WordPress installs.
|
||||
- wp-verify-checksums.sh for verifying checksums on WordPress installs
|
||||
|
||||
## Install
|
||||
```
|
||||
|
|
18
install.sh
18
install.sh
|
@ -16,36 +16,36 @@ 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/
|
||||
cp etc/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
|
||||
cp etc/bin/wp-* /usr/local/bin
|
||||
chmod 755 /usr/local/bin/wp-*
|
||||
|
||||
# install & enable wp systemd cron
|
||||
cp sbin/wp-cron.sh /usr/local/sbin/
|
||||
cp etc/sbin/wp-cron.sh /usr/local/sbin/
|
||||
chmod 755 /usr/local/sbin/wp-cron.sh
|
||||
if [[ ! -d /usr/local/lib/systemd/system ]]; then
|
||||
mkdir -p /usr/local/lib/systemd/system
|
||||
fi
|
||||
cp systemd/wp-cron.* /usr/local/lib/systemd/system/
|
||||
cp etc/systemd/wp-cron.* /usr/local/lib/systemd/system/
|
||||
chmod 644 /usr/local/lib/systemd/system/wp-cron.*
|
||||
systemctl enable wp-cron.timer
|
||||
systemctl start wp-cron.timer
|
||||
|
||||
# enable wp-security, restricts access to wordpress directories
|
||||
cp apache2/conf-available/wp-secuirty.conf /etc/apache2/conf-available/wp-secuirty.conf
|
||||
cp etc/apache2/conf-available/wp-secuirty.conf /etc/apache2/conf-available/wp-secuirty.conf
|
||||
chmod 644 /etc/apache2/conf-available/wp-secuirty.conf
|
||||
a2enconf wp-secuirty
|
||||
systemctl reload apache2
|
||||
|
||||
# fail2ban wordpress configs
|
||||
if [[ -d /etc/fail2ban/ ]]; then
|
||||
chmod 644 fail2ban/filter.d/*
|
||||
cp -a fail2ban/filter.d/* /etc/fail2ban/filter.d/
|
||||
chmod 644 fail2ban/jail.d/*
|
||||
cp -a fail2ban/jail.d/* /etc/fail2ban/jail.d/
|
||||
chmod 644 etc/fail2ban/filter.d/*
|
||||
cp -a etc/fail2ban/filter.d/* /etc/fail2ban/filter.d/
|
||||
chmod 644 etc/fail2ban/jail.d/*
|
||||
cp -a etc/fail2ban/jail.d/* /etc/fail2ban/jail.d/
|
||||
systemctl restart fail2ban
|
||||
else
|
||||
echo "Fail2ban not installed, skipping fail2ban wordpress configs."
|
||||
|
|
Loading…
Reference in New Issue
Block a user