From 9f7601a5de22863095f2a380b0c902d0aa90f58c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 29 Jun 2021 22:18:24 +0200 Subject: [PATCH] Fix --- conf/systemd.service | 8 ++++---- scripts/install | 10 ++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index b68fc08..cf0cdf9 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,19 +1,19 @@ [Unit] Description=The Rocket.Chat server -After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target +After=network.target remote-fs.target nss-lookup.target nginx.service mongod.service [Service] User=__APP__ WorkingDirectory=__FINALPATH__ Environment="PATH=__ENV_PATH__" Environment="NODE_ENV=production" -ExecStart=__YNH_NODE__ main.js +ExecStart=__YNH_NODE__ __FINALPATH__main.js StandardOutput=syslog StandardError=syslog SyslogIdentifier=rocketchat -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://localhost:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=http://localhost:__PORT__/ PORT=__PORT__ [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index f0ac8da..9abee92 100644 --- a/scripts/install +++ b/scripts/install @@ -120,15 +120,9 @@ ynh_add_nginx_config #============================================== ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=240 -pushd "$final_path" || ynh_die -curl https://install.meteor.com/ | sh - sudo -u $app meteor ynh_npm install - sudo -u $app meteor ynh_npm run postinstall - sudo -u $app meteor add rocketchat:lib - sudo -u $app meteor build --server-only --directory $final_path - cd $final_path/bundle/programs/server +pushd "$final_path" ynh_npm install -popd || ynh_die +popd #================================================= # SETUP SYSTEMD