update install script to create default configs

This commit is contained in:
lza_menace 2023-09-11 20:09:22 -07:00
parent 0cb0adc169
commit 3c1f40e0d8

12
install
View file

@ -174,6 +174,17 @@ install_xmrsh() {
echo -e "${Ok}" echo -e "${Ok}"
} }
configure_defaults() {
echo -e "${OkBullet}Setting up default configs (.env and docker-compose.yml)...${Off}"
if [ ! -f "docker-compose.yml" ]; then
cp docker-compose-example.yml docker-compose.yml
fi
if [ ! -f ".env" ]; then
cp env-example .env
fi
echo -e "${Ok}"
}
configure_network() { configure_network() {
echo -e "${OkBullet}Select the desired node network (mainnet, testnet, stagenet)" echo -e "${OkBullet}Select the desired node network (mainnet, testnet, stagenet)"
PS3=":: Enter a number: " PS3=":: Enter a number: "
@ -461,6 +472,7 @@ if [ $DOCKER_INSTALLED = true ] && [ $DOCKER_COMPOSE_INSTALLED = false ]; then
fi fi
install_xmrsh install_xmrsh
configure_defaults
configure_network configure_network
configure_tls_domain configure_tls_domain
configure_tls_port configure_tls_port