Skip to content

Commit

Permalink
Changed name of config file for version control
Browse files Browse the repository at this point in the history
  • Loading branch information
roenw authored Jul 30, 2020
1 parent 2ced015 commit d345af8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d345af8

Please sign in to comment.