Skip to content

Instantly share code, notes, and snippets.

@mrdaemon
Created February 25, 2011 22:19
Show Gist options
  • Save mrdaemon/844616 to your computer and use it in GitHub Desktop.
Save mrdaemon/844616 to your computer and use it in GitHub Desktop.
for i in `find /var/www -name wp-admin -type d` ; do unset host ; unset dir ; host=$(echo $i | cut -d '/' -f4) && echo -n ${host:?NOHOST} && dir=$(echo $i | sed 's/^\/var\/www\/[^/]\+\/htdocs\(\/[^/]*\)\/\?wp-admin/\1/') && echo ${dir:?NODIR} && sudo webapp-config -U -h ${host} -d $([[ ${dir} = "/" ]] && echo "/") ${dir#/} wordpress 3.0.5 ; if [ $? -ne 0 ] ; then logger -s -- "Webapp-Upgrade FAILED: $host -> $dir" ; fi ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment