From 74ee4c2e15d2c8911ccdeb1fe0d839b6bf57d9f8 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 28 Aug 2018 12:47:16 +0200 Subject: [PATCH] Fix install --- check_process | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 6 +++--- conf/systemd.service | 2 +- scripts/backup | 6 ------ scripts/install | 11 ++--------- scripts/remove | 15 +-------------- scripts/restore | 11 ++--------- scripts/upgrade | 9 +-------- 9 files changed, 13 insertions(+), 53 deletions(-) diff --git a/check_process b/check_process index a8189a7..f3fcefd 100644 --- a/check_process +++ b/check_process @@ -1,6 +1,6 @@ ;; Test complet ; pre-install - git clone https://github.com/YunoHost/CI_package_check /home + git clone https://github.com/YunoHost/CI_package_check /home/CI_package_check ; Manifest domain="domain.tld" (DOMAIN) path="/path" (PATH) diff --git a/conf/app.src b/conf/app.src index 6d9b2c8..16ffef8 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/YunoHost/yunorunner/archive/c5ef7b4856d5ab7abf1c0f63ee634d2da64ebc4b.zip -SOURCE_SUM=61f0cf03bf487a47568c6ccbd06de7b5 +SOURCE_URL=https://github.com/YunoHost/yunorunner/archive/40d135bbd88f7dddff6342408d549b0f3eb3441e.zip +SOURCE_SUM=a67a310fda89cd9d9eb19446bbd104ef SOURCE_SUM_PRG=md5sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index b790880..576bb4b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -8,9 +8,9 @@ location __PATH__/ { proxy_pass http://127.0.0.1:4242; -# proxy_http_version 1.1; -# proxy_set_header Upgrade $http_upgrade; -# proxy_set_header Connection "Upgrade"; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; # proxy_set_header Host $host; diff --git a/conf/systemd.service b/conf/systemd.service index 18b7784..047f0ea 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__ -ExecStart=__FINALPATH__/ve3/bin/python ./run.py /home/CI_package_check/analyseCI.sh | tee -a /var/log/__APP__/__APP__.log 2&>1 +ExecStart=__FINALPATH__/ve3/bin/python ./run.py /home/CI_package_check/analyseCI.sh [Install] WantedBy=multi-user.target diff --git a/scripts/backup b/scripts/backup index 4de007a..1aa2bc1 100644 --- a/scripts/backup +++ b/scripts/backup @@ -41,12 +41,6 @@ ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= - -ynh_backup "/etc/logrotate.d/$app" - #================================================= # BACKUP SYSTEMD #================================================= diff --git a/scripts/install b/scripts/install index f53526e..e7cb88f 100644 --- a/scripts/install +++ b/scripts/install @@ -127,20 +127,13 @@ ynh_add_systemd_config # SECURING FILES AND DIRECTORIES #================================================= -# Les fichiers appartiennent à root -chown -R root: $final_path - -#================================================= -# SETUP LOGROTATE -#================================================= - -ynh_use_logrotate +chown -R $app:root $final_path #================================================= # ENABLE SERVICE IN ADMIN PANEL #================================================= -yunohost service add NAME_INIT.D --log "/var/log/$app/$app.log" +yunohost service add $app.service #================================================= # SETUP SSOWAT diff --git a/scripts/remove b/scripts/remove index a4ba2cb..0437823 100755 --- a/scripts/remove +++ b/scripts/remove @@ -32,7 +32,7 @@ ynh_remove_systemd_config if yunohost service status | grep -q $app # Test l'existence du service dans Yunohost then ynh_print_info "Remove $app service" >&2 - yunohost service remove $app + yunohost service remove $app.service fi #================================================= @@ -53,12 +53,6 @@ ynh_secure_remove "/var/www/$app" # Suppression du dossier de l'application ynh_remove_nginx_config # Suppression de la configuration nginx -#================================================= -# REMOVE THE LOGROTATE CONFIG -#================================================= - -ynh_remove_logrotate # Suppression de la configuration de logrotate - #================================================= # CLOSE A PORT #================================================= @@ -69,13 +63,6 @@ then ynh_exec_quiet yunohost firewall disallow TCP 4242 fi -#================================================= -# SPECIFIC REMOVE -#================================================= - -# Suppression des log -ynh_secure_remove "/var/log/$app" - #================================================= # GENERIC FINALISATION #================================================= diff --git a/scripts/restore b/scripts/restore index 2366206..c9faf28 100644 --- a/scripts/restore +++ b/scripts/restore @@ -65,8 +65,7 @@ ynh_system_user_create $app # Recreate the dedicated user, if not exist # RESTORE USER RIGHTS #================================================= -# Les fichiers appartiennent à root -chown -R root: $final_path +chown -R $app:root $final_path #================================================= # SPECIFIC RESTORE @@ -80,7 +79,7 @@ ynh_install_app_dependencies python-virtualenv sqlite3 zlib1g-dev # ENABLE SERVICE IN ADMIN PANEL #================================================= -yunohost service add $app --log "/var/log/$app/APP.log" +yunohost service add $app.service #================================================= # RESTORE SYSTEMD @@ -90,12 +89,6 @@ ynh_restore_file "/etc/systemd/system/$app.service" ## Démarrage auto du service systemctl enable $app.service -#================================================= -# BACKUP OF THE LOGROTATE CONFIGURATION -#================================================= - -ynh_restore_file "/etc/logrotate.d/$app" - #================================================= # GENERIC FINALISATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 14afc69..f9b6791 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -85,12 +85,6 @@ ynh_system_user_create $app # Create the dedicated user, if not exist #================================================= # SPECIFIC UPGRADE -#================================================= -# SETUP LOGROTATE -#================================================= - -ynh_use_logrotate --non-append - #================================================= # SETUP SYSTEMD #================================================= @@ -104,8 +98,7 @@ ynh_add_systemd_config # SECURING FILES AND DIRECTORIES #================================================= -# Les fichiers appartiennent à root -chown -R root: $final_path +chown -R $app:root $final_path #================================================= # SETUP SSOWAT