diff --git a/conf/systemd.service b/conf/systemd.service index 190cfa0..ce8750c 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,8 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=/usr/local/n/versions/node/14.18.1/bin/pm2 start server/server.js -- --port=__PORT__ --name uptime-kuma -ExecStop=/usr/local/n/versions/node/14.18.1/bin/pm2 stop uptime-kuma +ExecStart=/usr/local/n/versions/node/14.18.1/bin/node server/server.js StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit diff --git a/scripts/install b/scripts/install index dcfca3f..aa65f19 100755 --- a/scripts/install +++ b/scripts/install @@ -208,12 +208,10 @@ ynh_add_nginx_config #================================================= # SPECIFIC SETUP #================================================= -ynh_script_progression --message="Installing Uptime Kuma..." --time --weight=3 -# Install pm2 (may be replaced by adequate systemd conf) -ynh_exec_warn_less ynh_exec_as $app /usr/local/n/versions/node/14.18.1/bin/npm install pm2 -g -# ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install pm2 -g +ynh_script_progression --message="Installing Uptime Kuma npm dependencies..." --time --weight=5 # ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ynh_exec_warn_less ynh_exec_as $app /usr/local/n/versions/node/14.18.1/bin/npm install +ynh_script_progression --message="Downloading Uptime Kuma frontend..." --time --weight=1 ynh_exec_warn_less ynh_exec_as $app wget https://github.com/louislam/uptime-kuma/releases/download/1.10.0/dist.tar.gz ynh_exec_as $app tar -xvf dist.tar.gz $final_path