Permalink
Browse files

add /usr/bin/cmupdate command in 123.09beta01

- typing command in SSH: cmupdate
- equivalent to running centmin.sh menu option 23 submenu option 2
  • Loading branch information...
centminmod committed Nov 22, 2017
1 parent 882f6c5 commit 1ba6585937e20dbe3907f44c97c559c0c25576bb
Showing with 53 additions and 0 deletions.
  1. +10 −0 inc/cpcheck.inc
  2. +43 −0 tools/cmupdate.sh
@@ -1092,6 +1092,14 @@ nvcheck() {
fi
}
cmupdatecheck() {
if [ ! -h /usr/bin/cmupdate ]; then
rm -rf /usr/bin/cmupdate
ln -s "${SCRIPT_DIR}/tools/cmupdate.sh" /usr/bin/cmupdate
chmod +x /usr/bin/cmupdate
fi
}
dmotdcheck() {
if [ ! -h /usr/local/bin/dmotd ]; then
if [ -f "${SCRIPT_DIR}/config/motd/dmotd.sh" ]; then
@@ -2014,6 +2022,7 @@ kernelchecks
pathfixes
apache_protect
setup_pwdh
cmupdatecheck
if [[ "$INITIALINSTALL" != [yY] ]]; then
expand_cmdprompt
@@ -2035,6 +2044,7 @@ if [[ "$INITIALINSTALL" != [yY] ]]; then
checkcmdircmd
# dmotdcheck
nvcheck
cmupdatecheck
multiphpcheck
mjemalloc
blockeditorcheck
@@ -0,0 +1,43 @@
#!/bin/bash
######################################################
# cmupdate
# written by George Liu (eva2000) centminmod.com
######################################################
# variables
MAINDIR='/etc/centminmod'
CM_INSTALLDIR='/usr/local/src/centminmod'
#############
if [ -f "${MAINDIR}/custom_config.inc" ]; then
# default is at /etc/centminmod/custom_config.inc
source "${MAINDIR}/custom_config.inc"
fi
# variables
#############
DT=$(date +"%d%m%y-%H%M%S")
######################################################
# functions
#############
# 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
fupdate() {
if [[ -d "${CM_INSTALLDIR}/.git" ]]; then
cd "${CM_INSTALLDIR}"
git stash
git pull
fi
}
######################################################
fupdate
exit

0 comments on commit 1ba6585

Please sign in to comment.