Upgrade на Pligg от terminal:
Upgrade на Pligg от терминал,bf:# cat pligg_upgrader_executor.sh
#!/bin/bash
# DH Pligg Upgrader v 1.0 (Written by amri)if [ "$#" -ne 2 ];
then
echo "Use arguments: install.sh PATH DOMAIN";exit;
fi;PATH=$1;
DOMAIN=$2;
CP="/bin/cp";
UNZIP="/usr/bin/unzip";
RM="/bin/rm";
CURL="/usr/bin/curl";
CHMOD="/bin/chmod";
MV="/bin/mv";
WGET="/usr/bin/wget";if [ ! -f "/tmp/latest.zip" ]
then
$WGET -q "http://pligg.com/downloads/latest/latest.zip" -O "/tmp/latest.zip";
fi;if [ ! -d "$PATH" ]
then
echo "DIRECTORY $PATH NOT EXIST!";exit;
fi;cd $PATH;
$CP /tmp/latest.zip . > /dev/null
$CP -Rvp templates templates.bak > /dev/null
$CP settings.php settings.php.bak > /dev/null
$CHMOD -R 777 modules languages cache settings.php > /dev/null
$UNZIP -o latest.zip > /dev/null
$CP -Rvp templates.bak/* templates/ > /dev/null
$RM -fr templates.bak > /dev/null
$CHMOD -R 777 modules languages cache > /dev/null
($CURL -e "http://$DOMAIN/install/upgrade.php?language=local" -F 'submit=yes' "http://$DOMAIN/install/upgrade.php?language=local") 2> /dev/null > /dev/null;
$MV settings.php.bak settings.php > /dev/null
$RM -fr settings.php.default libs/dbconnect.php.default install/ latest.zip > /dev/null
echo "[ OK ]";