From d345af814615106fb7b0452e67756bc6c7bcf544 Mon Sep 17 00:00:00 2001 From: Roen Wainscoat <13713430+roenw@users.noreply.github.com> Date: Wed, 29 Jul 2020 20:53:34 -1000 Subject: [PATCH] Changed name of config file for version control --- install.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/install.sh b/install.sh index 6666713..8ad7be0 100644 --- a/install.sh +++ b/install.sh @@ -128,6 +128,17 @@ move_to_latest_tag() { printf "${SYM_CHECK} Latest stable version $VERSION checked out.\\n" } +copy_sample_config() { + CFPATH=${WEBROOT}config.php + if test -f "$CFPATH"; then + printf "${SYM_INFO} ${CL_YELLOW}WARN:${CL_BLANK} The config file ${CFPATH} already exists and we do not want to overwrite it. Please manually copy the default to that path if you want to use the new version.\\n" + else + CFDEPATH=${WEBROOT}config-sample.php + sudo cp ${CFDEPATH} ${CFPATH} + printf "${SYM_CHECK} Installed a new default configuration file.\\n" + fi +} + if [[ $EUID -ne 0 ]]; then printf "${SYM_X} ${CL_RED}FATAL:${CL_BLANK} The installer must be run with root permissions\\n" exit 1; @@ -168,6 +179,8 @@ else exit; fi +copy_sample_config; + if [[ $(ps aux | grep -v 'grep' | grep ${PHPUSER}) ]]; then printf "${SYM_INFO} We think that the php user is ${PHPUSER}, but this is just a guess. Please update the PHPUSER variable in this file if this is wrong.\\n" else