Move link creation up

This commit is contained in:
Jose Diaz-Gonzalez
2016-08-29 10:47:23 -04:00
parent 10b1fd4068
commit 757ae311f9

View File

@@ -22,13 +22,13 @@ service_create() {
mkdir -p "$SERVICE_ROOT" || dokku_log_fail "Unable to create service directory" mkdir -p "$SERVICE_ROOT" || dokku_log_fail "Unable to create service directory"
mkdir -p "$SERVICE_ROOT/data" || dokku_log_fail "Unable to create service data directory" mkdir -p "$SERVICE_ROOT/data" || dokku_log_fail "Unable to create service data directory"
mkdir -p "$SERVICE_ROOT/config" || dokku_log_fail "Unable to create service config directory" mkdir -p "$SERVICE_ROOT/config" || dokku_log_fail "Unable to create service config directory"
touch "$LINKS_FILE"
echo -e "[mysqld]\nperformance_schema = 0" > "$SERVICE_ROOT/config/disable_performance_schema.cnf" echo -e "[mysqld]\nperformance_schema = 0" > "$SERVICE_ROOT/config/disable_performance_schema.cnf"
rootpassword=$(openssl rand -hex 8) rootpassword=$(openssl rand -hex 8)
password=$(openssl rand -hex 8) password=$(openssl rand -hex 8)
echo "$rootpassword" > "$SERVICE_ROOT/ROOTPASSWORD" echo "$rootpassword" > "$SERVICE_ROOT/ROOTPASSWORD"
echo "$password" > "$SERVICE_ROOT/PASSWORD" echo "$password" > "$SERVICE_ROOT/PASSWORD"
chmod 640 "$SERVICE_ROOT/ROOTPASSWORD" "$SERVICE_ROOT/PASSWORD" chmod 640 "$SERVICE_ROOT/ROOTPASSWORD" "$SERVICE_ROOT/PASSWORD"
touch "$LINKS_FILE"
if [[ -n $MYSQL_CUSTOM_ENV ]]; then if [[ -n $MYSQL_CUSTOM_ENV ]]; then
echo "$MYSQL_CUSTOM_ENV" | tr ';' "\n" > "$SERVICE_ROOT/ENV" echo "$MYSQL_CUSTOM_ENV" | tr ';' "\n" > "$SERVICE_ROOT/ENV"