Upgrade на Pligg от терминал

Upgrade на Pligg от terminal:

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    ]";

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Upgrade на Pligg от терминал, 5.0 out of 5 based on 1 rating

Вашият коментар

Вашият email адрес няма да бъде публикуван Задължителните полета са отбелязани с *