diff --git a/conf/systemd.service b/conf/systemd.service index f58a380..190cfa0 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,8 +7,8 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=pm2 start server/server.js -- --port=__PORT__ --name uptime-kuma -ExecStop=pm2 stop uptime-kuma +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 StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit diff --git a/scripts/_common.sh b/scripts/_common.sh index 7c3ba00..8298528 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,7 +8,7 @@ # pkg_dependencies="npm git nodejs" pkg_dependencies="" -nodejs_version=14 +nodejs_version=14.18.1 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 844fc54..dcfca3f 100755 --- a/scripts/install +++ b/scripts/install @@ -210,10 +210,12 @@ ynh_add_nginx_config #================================================= 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 $ynh_node_load_PATH $ynh_npm install pm2 -g -ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install -ynh_exec_warn_less ynh_exec_as $app wget cd $final_path && https://github.com/louislam/uptime-kuma/releases/download/1.10.0/dist.tar.gz -ynh_exec_as $app cd $final_path && tar -xvf dist.tar.gz +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_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_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 #================================================= # CREATE DATA DIRECTORY