diff --git a/conf/.env b/conf/.env new file mode 100644 index 0000000..efda5af --- /dev/null +++ b/conf/.env @@ -0,0 +1,3 @@ +export admin__username="__ADMIN__" +export admin__password="__PASSWORD__" +export admin__password__confirm="__PASSWORD__" \ No newline at end of file diff --git a/conf/config.json b/conf/config.json index 389039a..8ad5f72 100644 --- a/conf/config.json +++ b/conf/config.json @@ -2,10 +2,6 @@ "url": "http://127.0.0.1:__PORT__", "secret": "__SECRET__", "port": "__PORT__", - "admin__username": "__ADMIN__", - "admin__password": "__PASSWORD__", - "export admin__password__confirm": "__PASSWORD__", - "database": "redis", "redis": { "host": "127.0.0.1", diff --git a/scripts/install b/scripts/install index ed6700f..08c4ea0 100644 --- a/scripts/install +++ b/scripts/install @@ -124,6 +124,7 @@ chown -R $app:www-data "$final_path" #================================================= ynh_add_config --template="../conf/config.json" --destination="$final_path/config.json" +ynh_add_config --template="../conf/.env" --destination="$final_path/config.base.env" chmod 666 "$final_path/config.json" chown $app "$final_path/config.json" @@ -132,6 +133,7 @@ chown $app "$final_path/config.json" #================================================= pushd $final_path + ynh_exec_as $app env $ynh_node_load_PATH $final_path/config.base.env ynh_exec_as $app env $ynh_node_load_PATH $final_path/nodebb setup $final_path/config.json #-l > $install_log popd