diff --git a/conf/app.src b/conf/app.src index c4a4f39..e0e3b89 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Blount/Cheky/archive/3.8.1.tar.gz -SOURCE_SUM=b9170bc075c73f3e18638ed992541a4c562dd5447e6e4085a8798277184785dc +SOURCE_URL=https://github.com/Blount/Cheky/archive/4.1.tar.gz +SOURCE_SUM=320ea86a73c3e54809fd560959ac893df87a5dd663ff2176469c41e80b1d2434 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 9a23ebc..8ae6307 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,13 +1,15 @@ -location __PATH__ { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { # Path to source alias __FINALPATH__/ ; + # Force usage of https if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - # Example PHP configuration (remove if not used) +### Example PHP configuration (remove it if not used) index index.php; # Common parameter to increase upload size limit in conjuction with dedicated php-fpm file @@ -18,20 +20,13 @@ location __PATH__ { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock; - # If you don't use a dedicated fpm config for your app, - # use a general fpm pool. - # This is to be used INSTEAD of line above - # Don't forget to adjust scripts install/upgrade/remove/backup accordingly - # - #fastcgi_pass unix:/var/run/php5-fpm.sock; - fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; } - # PHP configuration end +### End of PHP configuration part # Very important security restriction # See https://forum.cheky.net/information-sur-message-avertissement-securite-t553-p1.html#p2127 diff --git a/manifest.json b/manifest.json index 05f9221..3482dc5 100644 --- a/manifest.json +++ b/manifest.json @@ -6,12 +6,12 @@ "en": "Cheky package for YunoHost.", "fr": "Application Cheky pour YunoHost." }, - "version": "3.8.1~ynh2", + "version": "4.1~ynh2", "url": "https://www.cheky.net", "license": "GPL-3.0-or-later", "maintainer": { "name": "Gofannon", - "email": "gofanon@riseup.net", + "email": "gofannon@riseup.net", "url": "" }, "previous_maintainers": [ @@ -27,7 +27,7 @@ } ], "requirements": { - "yunohost": ">> 2.6.4" + "yunohost": ">> 2.7.14" }, "multi_instance": true, "services": [ diff --git a/scripts/backup b/scripts/backup index 22f64d7..b28bec4 100644 --- a/scripts/backup +++ b/scripts/backup @@ -6,12 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -if [ ! -e _common.sh ]; then - # Get the _common.sh file if it's not in the current directory - cp ../settings/scripts/_common.sh ./_common.sh - chmod a+rx _common.sh -fi -source _common.sh +source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= @@ -61,11 +56,9 @@ ynh_mysql_dump_db "$db_name" > db.sql #================================================= # SPECIFIC BACKUP #================================================= -# BACKUP LOGROTATE +# ... #================================================= -ynh_backup "/etc/logrotate.d/$app" - #================================================= # BACKUP THE CRON FILE #================================================= diff --git a/scripts/install b/scripts/install index 8cfa207..057dac0 100644 --- a/scripts/install +++ b/scripts/install @@ -143,6 +143,12 @@ db_pwd=$(ynh_app_setting_get $app mysqlpwd) # Installation with curl ynh_local_curl "/index.php?mod=install" "password=$password" "confirmPassword=$password" "type=db" "db[host]=localhost" "db[user]=$db_name" "db[password]=$db_pwd" "db[dbname]=$db_name" +# Remove the public access +if [ $is_public -eq 0 ] +then + ynh_app_setting_delete $app skipped_uris +fi + #================================================= # GENERIC FINALIZATION #================================================= @@ -154,21 +160,10 @@ chown -R root: $final_path # Only path that needs to be writable by cheky chown -R $app: $final_path/var -#================================================= -# SETUP LOGROTATE -#================================================= - -# Use logrotate to manage application logfile(s) -ynh_use_logrotate - #================================================= # SETUP SSOWAT #================================================= -if [ $is_public -eq 0 ] -then # Remove the public access - ynh_app_setting_delete $app skipped_uris -fi # Make app public if necessary if [ $is_public -eq 1 ] then diff --git a/scripts/remove b/scripts/remove index 1cb9537..ddc4547 100644 --- a/scripts/remove +++ b/scripts/remove @@ -50,13 +50,6 @@ ynh_remove_nginx_config # Remove the dedicated php-fpm config ynh_remove_fpm_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= - -# Remove the app-specific logrotate config -ynh_remove_logrotate - #================================================= # CLOSE A PORT #================================================= diff --git a/scripts/restore b/scripts/restore index 232f668..d205235 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,12 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -if [ ! -e _common.sh ]; then - # Get the _common.sh file if it's not in the current directory - cp ../settings/scripts/_common.sh ./_common.sh - chmod a+rx _common.sh -fi -source _common.sh +source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= @@ -92,12 +87,6 @@ ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini" ynh_restore_file "/etc/cron.d/$app" -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= - -ynh_restore_file "/etc/logrotate.d/$app" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 46365fd..a3aa52c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -108,13 +108,6 @@ ynh_add_fpm_config # Recalculate and store the config file checksum into the app settings #ynh_store_file_checksum "$final_path/CONFIG_FILE" -#================================================= -# SETUP LOGROTATE -#================================================= - -# Use logrotate to manage app-specific logfile(s) -ynh_use_logrotate --non-append - #================================================= # GENERIC FINALIZATION #================================================= @@ -130,10 +123,6 @@ chown -R $app: $final_path/var # SETUP SSOWAT #================================================= -if [ $is_public -eq 0 ] -then # Remove the public access - ynh_app_setting_delete $app skipped_uris -fi # Make app public if necessary if [ $is_public -eq 1 ] then