Update paths and minor changes
This commit is contained in:
@@ -3,4 +3,5 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.0.1......Update paths and minor changes.
|
||||||
1.0.0......First Public Release.
|
1.0.0......First Public Release.
|
||||||
|
|||||||
+9
-9
@@ -52,7 +52,7 @@ CONFIG="/cf/conf/config.xml"
|
|||||||
PRDNAME="Bastille"
|
PRDNAME="Bastille"
|
||||||
APPNAME="bastille"
|
APPNAME="bastille"
|
||||||
EXTLOGFILE="${CWDIR}/log/bastille_ext.log"
|
EXTLOGFILE="${CWDIR}/log/bastille_ext.log"
|
||||||
FULLAPPNAME="${APPNAME}-main"
|
FULLAPPNAME="${APPNAME}-dist"
|
||||||
WWWPATH="/usr/local/www"
|
WWWPATH="/usr/local/www"
|
||||||
PKGCACHE="/var/cache/pkg"
|
PKGCACHE="/var/cache/pkg"
|
||||||
USRLOCAL="/usr/local"
|
USRLOCAL="/usr/local"
|
||||||
@@ -134,7 +134,7 @@ bastille_upgrade()
|
|||||||
{
|
{
|
||||||
# Perform an online bastille upgrade.
|
# Perform an online bastille upgrade.
|
||||||
DATE=$(date +"%a %b %d %T %Y")
|
DATE=$(date +"%a %b %d %T %Y")
|
||||||
echo "Looking for new ${PRDNAME} package!"
|
echo "Looking for new ${APPNAME} package!"
|
||||||
mkdir -p ${CWDIR}/update
|
mkdir -p ${CWDIR}/update
|
||||||
fetch -ao ${CWDIR}/update --no-verify-peer --timeout=30 ${BASTILE_VERSION} || \
|
fetch -ao ${CWDIR}/update --no-verify-peer --timeout=30 ${BASTILE_VERSION} || \
|
||||||
error_notify "Error: A problem has occurred while fetching version file."
|
error_notify "Error: A problem has occurred while fetching version file."
|
||||||
@@ -188,7 +188,7 @@ extension_upgrade()
|
|||||||
{
|
{
|
||||||
# Perform an online extension upgrade.
|
# Perform an online extension upgrade.
|
||||||
DATE=$(date +"%a %b %d %T %Y")
|
DATE=$(date +"%a %b %d %T %Y")
|
||||||
echo "Looking for new ${FULLAPPNAME} package!"
|
echo "Looking for new Extension package!"
|
||||||
mkdir -p ${CWDIR}/update
|
mkdir -p ${CWDIR}/update
|
||||||
fetch -ao ${CWDIR}/update --no-verify-peer --timeout=30 ${VERFILE} || \
|
fetch -ao ${CWDIR}/update --no-verify-peer --timeout=30 ${VERFILE} || \
|
||||||
error_notify "Error: A problem has occurred while fetching version file."
|
error_notify "Error: A problem has occurred while fetching version file."
|
||||||
@@ -198,7 +198,7 @@ extension_upgrade()
|
|||||||
UPDATEVER=$(cat ${CWDIR}/update/version | tr -d .)
|
UPDATEVER=$(cat ${CWDIR}/update/version | tr -d .)
|
||||||
CURRENTVER=$(cat ${CWDIR}/version | tr -d .)
|
CURRENTVER=$(cat ${CWDIR}/version | tr -d .)
|
||||||
if [ "${UPDATEVER}" -gt "${CURRENTVER}" ]; then
|
if [ "${UPDATEVER}" -gt "${CURRENTVER}" ]; then
|
||||||
echo "New ${FULLAPPNAME} package found, performing upgrade..."
|
echo "New Extension package found, performing upgrade..."
|
||||||
fetch -ao ${CWDIR}/update --no-verify-peer --timeout=30 ${GITURL} || \
|
fetch -ao ${CWDIR}/update --no-verify-peer --timeout=30 ${GITURL} || \
|
||||||
error_notify "Error: A problem has occurred while fetching extension package."
|
error_notify "Error: A problem has occurred while fetching extension package."
|
||||||
tar -xf ${CWDIR}/update/${BRANCH}.zip --exclude='.git*' --strip-components 1 -C ${CWDIR}/update
|
tar -xf ${CWDIR}/update/${BRANCH}.zip --exclude='.git*' --strip-components 1 -C ${CWDIR}/update
|
||||||
@@ -209,11 +209,11 @@ extension_upgrade()
|
|||||||
|
|
||||||
# Logging the update event.
|
# Logging the update event.
|
||||||
UPDATEVERSION=$(cat ${CWDIR}/version)
|
UPDATEVERSION=$(cat ${CWDIR}/version)
|
||||||
echo "${DATE}: ${FULLAPPNAME} upgraded to ${UPDATEVERSION}" >> ${EXTLOGFILE}
|
echo "${DATE}: Extension upgraded to ${UPDATEVERSION}" >> ${EXTLOGFILE}
|
||||||
echo "${FULLAPPNAME} upgraded to version ${UPDATEVERSION}"
|
echo "Extension upgraded to version ${UPDATEVERSION}"
|
||||||
echo "${FULLAPPNAME} package upgrade completed!"
|
echo "Extension package upgrade completed!"
|
||||||
else
|
else
|
||||||
echo "${FULLAPPNAME} is on the latest version!"
|
echo "Extension is on the latest version!"
|
||||||
rm -R ${CWDIR}/update
|
rm -R ${CWDIR}/update
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -569,7 +569,7 @@ remove_addon()
|
|||||||
# Remove addon related files and folders only-
|
# Remove addon related files and folders only-
|
||||||
# to protect any user-created custom files-
|
# to protect any user-created custom files-
|
||||||
# as well as for the containers dirs/files.
|
# as well as for the containers dirs/files.
|
||||||
FILES="conf download gui locale-bastille log bastille-main LICENSE README.md postinit release_notes version bastille-init"
|
FILES="conf download gui locale-bastille log bastille-dist LICENSE README.md postinit CHANGELOG version bastille-init"
|
||||||
for FILE in ${FILES}; do
|
for FILE in ${FILES}; do
|
||||||
if [ -f "${CWDIR}/${file}" ] || [ -d "${CWDIR}/${file}" ]; then
|
if [ -f "${CWDIR}/${file}" ] || [ -d "${CWDIR}/${file}" ]; then
|
||||||
rm -rf ${CWDIR}/${FILE}
|
rm -rf ${CWDIR}/${FILE}
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ if ($_POST) {
|
|||||||
bindtextdomain("xigmanas", $textdomain);
|
bindtextdomain("xigmanas", $textdomain);
|
||||||
if (is_link($textdomain_bastille)) mwexec("rm -f {$textdomain_bastille}", true);
|
if (is_link($textdomain_bastille)) mwexec("rm -f {$textdomain_bastille}", true);
|
||||||
if (is_dir($confdir)) mwexec("rm -Rf {$confdir}", true);
|
if (is_dir($confdir)) mwexec("rm -Rf {$confdir}", true);
|
||||||
mwexec("rm /usr/local/www/bastille-gui.php && rm -R /usr/local/www/ext/bastille-gui", true);
|
mwexec("rm /usr/local/www/bastille_manager_gui.php && rm -R /usr/local/www/ext/bastille", true);
|
||||||
mwexec("{$rootfolder}/bastille-init -t", true);
|
mwexec("{$rootfolder}/usr/local/sbin/bastille-init -t", true);
|
||||||
$uninstall_cmd = "echo 'y' | bastille-init -R";
|
$uninstall_cmd = "echo 'y' | /usr/local/sbin/bastille-init -R";
|
||||||
mwexec($uninstall_cmd, true);
|
mwexec($uninstall_cmd, true);
|
||||||
if (is_link("/usr/local/share/{$prdname}")) mwexec("rm /usr/local/share/{$prdname}", true);
|
if (is_link("/usr/local/share/{$prdname}")) mwexec("rm /usr/local/share/{$prdname}", true);
|
||||||
if (is_link("/var/cache/pkg")) mwexec("rm /var/cache/pkg", true);
|
if (is_link("/var/cache/pkg")) mwexec("rm /var/cache/pkg", true);
|
||||||
@@ -201,6 +201,9 @@ $(document).ready(function(){
|
|||||||
if(!empty($errormsg)):
|
if(!empty($errormsg)):
|
||||||
print_error_box($errormsg);
|
print_error_box($errormsg);
|
||||||
endif;
|
endif;
|
||||||
|
if(!empty($savemsg)):
|
||||||
|
print_info_box($savemsg);
|
||||||
|
endif;
|
||||||
if(!empty($input_errors)):
|
if(!empty($input_errors)):
|
||||||
print_input_errors($input_errors);
|
print_input_errors($input_errors);
|
||||||
endif;
|
endif;
|
||||||
|
|||||||
Reference in New Issue
Block a user