diff options
author | Jonne Haß <me@jhass.eu> | 2020-09-04 22:57:52 +0300 |
---|---|---|
committer | Jonne Haß <me@jhass.eu> | 2020-09-04 22:58:57 +0300 |
commit | 15c11b87caf4bc6a3a5d6c627732a0d88eb3e527 (patch) | |
tree | b30d606e93efcaa56ca7507f1505bfefed21ee58 /script | |
parent | 9df2e957244e81151c6b5ae9dbc2f7420308ced3 (diff) | |
parent | ce82ba3dde7178b6e707d83bc6246fe033a328c9 (diff) |
Merge branch 'next-minor' into develop
Diffstat (limited to 'script')
-rwxr-xr-x | script/diaspora-dev | 4 | ||||
-rwxr-xr-x | script/server | 19 |
2 files changed, 14 insertions, 9 deletions
diff --git a/script/diaspora-dev b/script/diaspora-dev index fe106edba..e625524fe 100755 --- a/script/diaspora-dev +++ b/script/diaspora-dev @@ -257,7 +257,7 @@ dia_config() { if [ ! -z $dia_config_delete ]; then rm "$DIASPORA_CONFIG_DIA" "$DIASPORA_CONFIG_DB" fi - # Create new diaspora.yml if none exists + # Create new diaspora.toml if none exists if [ ! -f "$DIASPORA_CONFIG_DIA" ]; then cp "$DIASPORA_CONFIG_DIA".example "$DIASPORA_CONFIG_DIA" fi @@ -477,7 +477,7 @@ export SCRIPT_ROOT=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) export DIASPORA_ROOT=$(dirname "$SCRIPT_ROOT") export DIASPORA_ROOT_UID=1001 export DIASPORA_ROOT_GID=1001 -export DIASPORA_CONFIG_DIA=$DIASPORA_ROOT/config/diaspora.yml +export DIASPORA_CONFIG_DIA=$DIASPORA_ROOT/config/diaspora.toml export DIASPORA_CONFIG_DB=$DIASPORA_ROOT/config/database.yml export DIASPORA_DOCKER_DB=$(dia_get_db) diff --git a/script/server b/script/server index 86151d973..e5d8600a2 100755 --- a/script/server +++ b/script/server @@ -55,10 +55,15 @@ then fatal "config/database.yml is missing! Copy over config/database.yml.example to config/database.yml and edit it properly!" fi -# Check if diaspora.yml exists -if [ ! -e "config/diaspora.yml" ] +# Check if diaspora.toml exists +if [ -e "config/diaspora.toml" ] then - fatal "config/diaspora.yml is missing! Copy over config/diaspora.yml.example to config/diaspora.yml and edit it properly!" + CONFIG_FILE="config/diaspora.toml" +elif [ -e "config/diaspora.yml" ] +then + CONFIG_FILE="config/diaspora.yml" +else + fatal "config/diaspora.toml is missing! Copy over config/diaspora.toml.example to config/diaspora.toml and edit it properly!" fi command -v git > /dev/null 2>&1 @@ -100,7 +105,7 @@ fi if [ -z "$RAILS_ENV" ] then RAILS_ENV=$(bin/bundle exec ruby ./script/get_config.rb server.rails_environment | grep -vE "is not writable|as your home directory temporarily" ) - on_failure "Couldn't parse config/diaspora.yml!" + on_failure "Couldn't parse $CONFIG_FILE!" export RAILS_ENV fi @@ -113,7 +118,7 @@ vars=$(bin/bundle exec ruby ./script/get_config.rb \ redis_url=environment.redis \ | grep -vE "is not writable|as your home directory temporarily" ) -on_failure "Couldn't parse config/diaspora.yml!" +on_failure "Couldn't parse $CONFIG_FILE!" eval "$vars" args="$@" @@ -167,10 +172,10 @@ then if [ -n "$redis_url" ] then redis_param="url: '$redis_url'" - fi + fi if [ "$(bin/bundle exec ruby -e "require 'redis'; puts Redis.new($redis_param).ping" 2> /dev/null | grep -vE "is not writable|as your home directory temporarily" )" != "PONG" ] then - fatal "Can't connect to redis. Please check if it's running and if environment.redis is configured correctly in config/diaspora.yml." + fatal "Can't connect to redis. Please check if it's running and if environment.redis is configured correctly in $CONFIG_FILE." fi fi |