diff --git a/conf/systemd.service b/conf/systemd.service index c0d79a9..1a953a1 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,6 +7,8 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ +Environment=PATH=__ENV_PATH__ +Environment=NODE_ENV=production ExecStart=__INSTALL_DIR__/cmd.js --serve --port=__PORT__ --watch --quiet Restart=always diff --git a/scripts/install b/scripts/install index 7d9f850..cf00917 100755 --- a/scripts/install +++ b/scripts/install @@ -40,6 +40,7 @@ ynh_script_progression --message="Adding system configurations related to $app.. # Create a dedicated NGINX config using the conf/nginx.conf template ynh_add_nginx_config +env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config diff --git a/scripts/upgrade b/scripts/upgrade index 4129d35..28a2167 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,6 +49,7 @@ ynh_script_progression --message="Upgrading system configurations related to $ap ynh_add_nginx_config +env_path="$PATH" ynh_add_systemd_config yunohost service add $app --description="Simpler site generator" --log="/var/log/$app/$app.log"