#!/bin/bash # wordpress is installed on /home/web WPDIR=/home/web WPUSER=www-data TODAY=$(date +%Y%m%d) if [ ! -f $WPDIR/wp-config.php ]; then echo "ERROR: no file $WPDIR/wp-config.php" echo "Folder $WPDIR does not seem to contain WordPress" exit 1 fi # backup tar caf backup.$TODAY.tar.xz $WPDIR # stop web server service lighttpd stop # download the new version cd $WPDIR/.. rm -f wordpress.tar.gz wget https://wordpress.org/latest.tar.gz -O wordpress-$TODAY.tar.gz # unzip the new version rm -rf wordpress tar xaf wordpress-$TODAY.tar.gz # start upgrading rm -rf $WPDIR/wp-includes/ $WPDIR/wp-admin/ mv wordpress/wp-includes wordpress/wp-admin $WPDIR/ rsync -av wordpress/ $WPDIR/ # remove maintenance rm -rf $WPDIR/.maintenance # reset ownership chown -R $WPUSER.$WPUSER $WPDIR # restart web server service lighttpd start
Today my hometown Vitoria completes 470 years. The Yemanjá monument (picture) was one of my favorite places to hang out. Yemanjá is the queen of sea of the Yorubá people, one of the largest ethnic groups in Nigeria. According to Continue reading Vitória 470 years
#1 Every single day 784 pieces of legislation are created in Brazil: laws, decrees and even amendments to the constitution are very common. #2 Due to extreme bureaucracy, the best paid profession is of owner of a notary office. Among Continue reading 20 Insane Facts About Doing Business in Brazil
Very often firms, even the small ones, will pride themselves on hiring the smartest brains on the market, just to submit them to a life on the shelf, performing mundane tasks, often with bad outcomes. The prevailing thought is Hire the Continue reading Tech Consulting = Higher Profits + Lower Risks
There are numerous articles about the topic ‘do you have what it takes to be an entrepreneur’? The article’s main idea, invariably written by an ‘expert’, is that you should stick with a 9-5 job if you don’t fulfill every Continue reading Do You Have What It Takes… To Be An Employee?
Do objects have color after all? This post reviews that this might be an ill-defined question after all. Structural color is based in the dynamics of interaction of light with the subject, not absorption. Magnific, beautiful post from Raymond Weitekamp Continue reading What is structural color?