From 2b8ffd4595b2c230f5cbf6f3e96f10eaf460d82e Mon Sep 17 00:00:00 2001 From: Sven Wagener Date: Tue, 30 Oct 2018 12:28:09 +0100 Subject: [PATCH] Changed setup files (please reinit and add credentials!) --- includes/db.sh | 6 ++---- includes/init.sh | 4 +--- templates/conf/devops.conf | 24 ++++++++++++++++++++++++ templates/conf/server.conf | 15 --------------- 4 files changed, 27 insertions(+), 22 deletions(-) create mode 100755 templates/conf/devops.conf delete mode 100755 templates/conf/server.conf diff --git a/includes/db.sh b/includes/db.sh index 9d6f4fe..80ba815 100755 --- a/includes/db.sh +++ b/includes/db.sh @@ -16,11 +16,9 @@ _db_import() { exit fi - db_conf=${CONF_DIR}"/db.conf" - server_conf=${CONF_DIR}"/server.conf" + devops_conf=${CONF_DIR}"/devops.conf" - source ${db_conf} - source ${server_conf} + source ${devops_conf} read -p "This will drop all database data of the local installation and will replace it by new data. Are you really sure? (y/N) " i_am_sure diff --git a/includes/init.sh b/includes/init.sh index d012192..5fdd268 100755 --- a/includes/init.sh +++ b/includes/init.sh @@ -65,9 +65,7 @@ function _copy_files { exit 1 fi - cp "${CONFIG_TEMPLATE_DIR}/db.conf" "${CONFIG_DIR}/db.conf" - cp "${CONFIG_TEMPLATE_DIR}/ftp.conf" "${CONFIG_DIR}/ftp.conf" - cp "${CONFIG_TEMPLATE_DIR}/server.conf" "${CONFIG_DIR}/server.conf" + cp "${CONFIG_TEMPLATE_DIR}/devops.conf" "${CONFIG_DIR}/devops.conf" mkdir -p "${CONFIG_DIR}/nginx" cp "${CONFIG_TEMPLATE_DIR}/nginx/default.conf" "${CONFIG_DIR}/nginx/default.conf" diff --git a/templates/conf/devops.conf b/templates/conf/devops.conf new file mode 100755 index 0000000..1bc9cc3 --- /dev/null +++ b/templates/conf/devops.conf @@ -0,0 +1,24 @@ +#!/bin/bash + +## +# Host +# +# Setup your host data. +## + +REMOTE_HOST=yourdomain.tld +REMOTE_URL=https://${REMOTE_HOST} + +LOCAL_HOST=localhost +LOCAL_URL=http://localhost + +## +# Database +# +# Setup your local database config. +## + +DB_LOCAL_USER=root +DB_LOCAL_PASS=root +DB_LOCAL_HOST=localhost +DB_LOCAL_NAME=website \ No newline at end of file diff --git a/templates/conf/server.conf b/templates/conf/server.conf deleted file mode 100755 index ad315eb..0000000 --- a/templates/conf/server.conf +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -## -# Cofig file for Server site credentials -## - -LOCAL_HOST=localhost -LOCAL_URL=http://localhost - -REMOTE_HOST=#REMOTE_HOST# -REMOTE_URL=#REMOTE_URL# - -DEFAULT_USER=admin -DEFAULT_PASS=password -DEFAULT_EMAIL=sven@awesome.ug