Permalink
Browse files

Uitbreiding voor Gallery 2.x

  • Loading branch information...
1 parent 40b788c commit 59c2f9626fc3257b880ed4c40b4188a864da93cb @trumbaut trumbaut committed May 30, 2012
Showing with 15 additions and 1 deletion.
  1. +15 −1 gallery.sh
View
16 gallery.sh 100644 → 100755
@@ -18,6 +18,20 @@ do
# /var/www/vhosts/os.jnet.be/httpdocs/gallery2/modules/core/AdminCore.inc
domain=`echo $domain | awk -F "modules/core/AdminCore.inc" '{print $1}'`
echo $domain
- #cat $domain | grep -E "const VERSION" | awk -F " VERSION = \"" '{print $2}' | awk -F "\";" '{print $1}'
+ hostname=`cat ${domain}config.php | grep "storeConfig" | grep "hostname" | awk -F "= '" '{print $2}' | awk -F "';" '{print $1}'`
+ database=`cat ${domain}config.php | grep "storeConfig" | grep "database" | awk -F "= '" '{print $2}' | awk -F "';" '{print $1}'`
+ username=`cat ${domain}config.php | grep "storeConfig" | grep "username" | awk -F "= '" '{print $2}' | awk -F "';" '{print $1}'`
+ password=`cat ${domain}config.php | grep "storeConfig" | grep "password" | awk -F "= '" '{print $2}' | awk -F "';" '{print $1}'`
+ echo "hostname: $hostname";
+ echo "database: $database";
+ echo "username: $username";
+ echo "password: $password";
+ version=`mysql -u $username -D$database -h $hostname -p$password --skip-column-names -e "SELECT g_packageVersion FROM g2_PluginPackageMap WHERE g_pluginType='module' AND g_pluginId='core'"`
+ if [ -n "$version" ]; then
+ #version=`echo $version | grep "module" | grep "core" | awk '{print $4}'`
+ echo "version: $version";
+ else
+ echo "Problem while connecting with the database"
+ fi
done

0 comments on commit 59c2f96

Please sign in to comment.