#!/bin/bash BASE_DIR="/var/www/blogs.gentoo.org" # created by cfengine REPO="${BASE_DIR}/blogs-gentoo" # Get latest Git changes pushd ${BASE_DIR}/blogs-gentoo > /dev/null git reset --hard origin/master > /dev/null 2>&1 git pull --force > /dev/null 2>&1 popd > /dev/null # Rsync the plugins folder from the repo inside wp-content rsync -avz --delete-after ${REPO}/plugins/ ${BASE_DIR}/htdocs/wp-content/plugins > /dev/null # List of themes # In order to install a new theme, add it under themes/, then put # its name in the THEMES array, and finally enable it from the admin panel # # We added twenty* which normally come with a worpress upgrade, but between # upgrades, newer theme versions were released and so we had to update these # independently. Anthony G. Basile - Aug 16, 2016. THEMES=( wp-oxygen kde-breathe kde-graffiti mantra twentyfourteen twentyfifteen twentysixteen twentynineteen ) for THEME in ${THEMES[@]} ; do [[ -L ${BASE_DIR}/htdocs/wp-content/themes/${THEME} ]] || \ ln -s ${REPO}/themes/${THEME} ${BASE_DIR}/htdocs/wp-content/themes/ done [[ -d ${BASE_DIR}/htdocs/wp-content/blogs.dir ]] || mkdir ${BASE_DIR}/htdocs/wp-content/blogs.dir chown apache:root ${BASE_DIR}/htdocs/wp-content/blogs.dir chmod 744 ${BASE_DIR}/htdocs/wp-content/blogs.dir