diff --git a/scripts/install b/scripts/install index 528a911..97d7128 100644 --- a/scripts/install +++ b/scripts/install @@ -167,21 +167,21 @@ cat /etc/systemd/system/$app.service # CONFIGURE SERVER.JS #================================================= -#mv ../conf/config.json $final_path/config.json -#ynh_replace_string "__URL__" "$domain" "$final_path/config.json" -#ynh_replace_string "__PORT__" "$port" "$final_path/config.json" -#ynh_replace_string "__SECRET__" "$secret" "$final_path/config.json" -#ynh_replace_string "dbuser" "$dbuser" "$final_path/config.json" -#ynh_replace_string "dbname" "$dbname" "$final_path/config.json" -#ynh_replace_string "dbpass" "$dbpass" "$final_path/config.json" -#cat $final_path/config.json +mv ../conf/config.json $final_path/config.json +ynh_replace_string "__URL__" "$domain" "$final_path/config.json" +ynh_replace_string "__PORT__" "$port" "$final_path/config.json" +ynh_replace_string "__SECRET__" "$secret" "$final_path/config.json" +ynh_replace_string "dbuser" "$dbuser" "$final_path/config.json" +ynh_replace_string "dbname" "$dbname" "$final_path/config.json" +ynh_replace_string "dbpass" "$dbpass" "$final_path/config.json" +cat $final_path/config.json #================================================= # CONFIGURE NODEBB #================================================= pushd $final_path -node app --setup=\"{\\\"url\\\":\\\"http://127.0.0.1:4567\\\",\\\"secret\\\":\\\"$secret\\\",\\\"database\\\":\\\"$dbname\\\",\\\"mongo:host\\\":\\\"127.0.0.1\\\",\\\"mongo:port\\\":27017,\\\"mongo:username\\\":\\\"$dbuser\\\",\\\"mongo:password\\\":\\\"$dbpass\\\",\\\"mongo:database\\\":0,\\\"redis:host\\\":\\\"127.0.0.1\\\",\\\"redis:port\\\":6379,\\\"redis:password\\\":\\\"\\\",\\\"redis:database\\\":0,\\\"admin:username\\\":\\\"$admin_user\\\",\\\"admin:email\\\":\\\"$admin_mail\\\",\\\"admin:password\\\":\\\"$admin_pass\\\",\\\"admin:password:confirm\\\":\\\"$admin_pass\\\"}\" --ci=\"{\\\"host\\\":\\\"127.0.0.1\\\",\\\"port\\\":27017,\\\"database\\\":0}\"; <<< exit +./nodebb setup ./nodebb build popd chown -R $app:$app $final_path