wok-current rev 23736
updated wordpress (5.2.4 -> 5.4.1)
author | Hans-G?nter Theisgen |
---|---|
date | Fri May 01 10:06:58 2020 +0100 (2020-05-01) |
parents | 212e026e2361 |
children | e7c729ae0681 |
files | wordpress/receipt |
line diff
1.1 --- a/wordpress/receipt Fri May 01 09:55:09 2020 +0100 1.2 +++ b/wordpress/receipt Fri May 01 10:06:58 2020 +0100 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="wordpress" 1.7 -VERSION="5.2.4" 1.8 +VERSION="5.4.1" 1.9 CATEGORY="misc" 1.10 SHORT_DESC="Blog Tool and Publishing Platform." 1.11 MAINTAINER="slaxemulator@gmail.com" 1.12 @@ -18,8 +18,9 @@ 1.13 genpkg_rules() 1.14 { 1.15 mkdir -p $fs/var/www/wordpress 1.16 - cp -a $src/* $fs/var/www/wordpress 1.17 - chown -R www.www $fs/var/www/wordpress 1.18 + 1.19 + cp -a $src/* $fs/var/www/wordpress 1.20 + chown -R www.www $fs/var/www/wordpress 1.21 } 1.22 1.23 post_install() 1.24 @@ -28,18 +29,22 @@ 1.25 local db_user=wordpress 1.26 local db_password=wordpress 1.27 1.28 - # Minimal config for wordpress. 1.29 - if [ -z "$1" ]; then 1.30 - if ( ! mysqladmin -s ping > /dev/null ); then 1.31 + # Minimal configuration for wordpress. 1.32 + if [ -z "$1" ] 1.33 + then 1.34 + if ( ! mysqladmin -s ping > /dev/null ) 1.35 + then 1.36 echo 1.37 echo "Starting MySQL server" 1.38 ( /etc/init.d/mysql start ; status ) || exit 1.39 sleep 4 #let the mysql daemon start 1.40 fi 1.41 - if ( ! mysql -u root -Be 'show databases' | grep -q $db ); then 1.42 + if ( ! mysql -u root -Be 'show databases' | grep -q $db ) 1.43 + then 1.44 echo 1.45 echo -n "Create $db database" 1.46 - mysql -Be "create database $db" ; status 1.47 + mysql -Be "create database $db" 1.48 + status 1.49 # We suppose that $DB_USER user does not exist. 1.50 # It may be false. 1.51 echo -n "Create user $db_user with password $db_password" 1.52 @@ -59,7 +64,8 @@ 1.53 local db_user=wordpress 1.54 local db_password=wordpress 1.55 1.56 - if [ -z "$1" ]; then 1.57 + if [ -z "$1" ] 1.58 + then 1.59 echo -n "Would you like to remove data and database files.(y/n) " 1.60 read answer 1.61 1.62 @@ -67,13 +73,16 @@ 1.63 y|Y) 1.64 echo -n "Removing data directories..." 1.65 [ -d /var/lib/wordpress ] && rm -rf /var/lib/wordpress ; status 1.66 - if ( mysql -u root -Be 'show databases' | grep -q $db ); then 1.67 + if ( mysql -u root -Be 'show databases' | grep -q $db ) 1.68 + then 1.69 echo -n "Deleting $db database" 1.70 - mysql -Be "drop database $db" ; status 1.71 + mysql -Be "drop database $db" 1.72 + status 1.73 # We suppose that glpi user does not exist. 1.74 # It may be false. 1.75 echo -n "Delete user $db_user" 1.76 - mysql -Be "delete from mysql.db where user='"$db_user"'" ; status 1.77 + mysql -Be "delete from mysql.db where user='"$db_user"'" 1.78 + status 1.79 fi 1.80 unset $answer 1.81 ;;