HEX
Server: nginx/1.29.3
System: Linux 11979.bigscoots-wpo.com 6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 x86_64
User: nginx (1068)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_open,proc_close,popen,show_source,cmd# Do not modify this line # 1684243876
Upload Files
File: //usr/local/src/centminmod/tools/centminmod_packager.sh
#!/bin/bash
################################################
# package up the Centmin Mod required downloads
# from /svr-setup into a zip package you can
# reuse locally for new installs without having
# to redownload the entire info
################################################
DT=$(date +"%d%m%y-%H%M%S")
PKGBASE='/home'
PKGDIR="${PKGBASE}/centminmod_pkg"
PKGNAME='centminmod_pkg'

################################################
# set locale temporarily to english
# due to some non-english locale issues
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
# disable systemd pager so it doesn't pipe systemctl output to less
export SYSTEMD_PAGER=''
ARCH_CHECK="$(uname -m)"

shopt -s expand_aliases
for g in "" e f; do
    alias ${g}grep="LC_ALL=C ${g}grep"  # speed-up grep, egrep, fgrep
done

mkdir -p $PKGDIR

if [ ! -f /usr/bin/zip ]; then
  yum -y -q install zip
fi

cd /svr-setup
for f in $(ls /svr-setup)
 do 
	if [[ "$(stat --printf='%F' $f)" != 'directory' ]]; then 
		echo "copying $f to $PKGDIR"
		\cp -f $f $PKGDIR
	fi
done

NGXPAGESPEED_NAME=$(ls -t | grep incubator-pagespeed-ngx | head -n1)
if [[ ! -z "$NGXPAGESPEED_NAME" ]]; then
  echo
  echo "copy ngx_pagespeed + psol"
  cd /svr-setup
  \cp -a $NGXPAGESPEED_NAME $PKGDIR
fi

echo
du -sh $PKGDIR
ls -lah $PKGDIR

echo
echo "zip up package directory $PKGDIR"
cd $PKGBASE
time zip -4 -q -r ${PKGNAME}-$DT ${PKGNAME}

echo
ls -lah $PKGBASE | grep $PKGNAME

# clean up
rm -rf $PKGDIR

echo
echo "packaging completed"
echo "saved package to ${PKGBASE}/${PKGNAME}-${DT}.zip"
exit