From f32e1e47c9022e875ccdafd7378254fb98a08271 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 30 Jun 2021 11:09:18 +0200 Subject: [PATCH] Fix --- conf/systemd.service | 5 +++-- scripts/install | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 883e759..eac4583 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,6 +1,7 @@ [Unit] Description=The Rocket.Chat server -After=network.target remote-fs.target nss-lookup.target nginx.service mongod.service +Wants=__MONGODB_SERVICENAME__.service +After=network.target remote-fs.target nss-lookup.target nginx.service __MONGODB_SERVICENAME__.service [Service] User=__APP__ @@ -11,7 +12,7 @@ ExecStart=__YNH_NODE__ __FINALPATH__/main.js StandardOutput=syslog StandardError=syslog SyslogIdentifier=__APP__ -Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=http://__DOMAIN__:__PORT__ PORT=__PORT__ +Environment=MONGO_URL=mongodb://127.0.0.1:27017/__APP__?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://127.0.0.1:27017/local?replicaSet=rs01 ROOT_URL=http://127.0.0.1:__PORT__/ PORT=__PORT__ [Install] WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index ac6c464..f144bd9 100644 --- a/scripts/install +++ b/scripts/install @@ -127,7 +127,7 @@ pushd $final_path/programs/server #export MONGO_URL='mongodb://$db_user:$db_pwdd@host:27017/$db_name' #export ROOT_URL='http://$domain' - #export MAIL_URL='smtp://user:password@mailhost:port/' + #export MAIL_URL='smtp://localhost:25' popd #================================================= @@ -161,7 +161,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_systemd_action --service_name=$app --action=start --log_path=systemd #--line_match="HTTP Server listening" ynh_systemd_action --service_name=mongod --action=start --log_path=systemd -mongo --eval "printjson(rs.initiate())" +#mongo --eval "printjson(rs.initiate())" #================================================= # SETUP SSOWAT