diff --git a/conf/app.src b/conf/app.src index 3bf9235..57c719d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -3,5 +3,4 @@ SOURCE_SUM=5a0c880519df3c61b1c97c7bbb8c349dc2dde4f25e506478a0a643e47d25ff5e SOURCE_SUM_PRG=sha256sum ARCH_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= SOURCE_EXTRACT=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 556b622..549b52a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..5edd3bb --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +A customizable PHP script that displays information about your system nicely. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..4a6a91c --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,3 @@ +## Configuration + +Edit `phpsysinfo.ini` in `/var/www/YOURPATH/phpsysinfo.ini`. diff --git a/doc/screenshots/screenshot.png b/doc/screenshots/screenshot.png new file mode 100644 index 0000000..d5e89ed Binary files /dev/null and b/doc/screenshots/screenshot.png differ diff --git a/manifest.json b/manifest.json index 7266e6c..c20ca9e 100644 --- a/manifest.json +++ b/manifest.json @@ -3,18 +3,25 @@ "name": "PhpSysInfo", "packaging_format": 1, "description": { - "en": "A customizable PHP script that displays information about your system nicely.", - "fr": "Un script PHP paramétrable qui affiche des informations sur votre système." + "en": "Customizable PHP script that displays information about your system nicely", + "fr": "Un script PHP paramétrable qui affiche des informations sur votre système" }, "version": "3.3.4~ynh1", - "url": "https://github.com/inrepublica/phpsysinfo_ynh/", + "url": "https://phpsysinfo.github.io/phpsysinfo/", + "upstream": { + "license": "GPL-3.0-only", + "website": "https://phpsysinfo.github.io/phpsysinfo/", + "demo": "http://phpsysinfo.sourceforge.net/multi/index.php?disp=bootstrap&xml=raspbian", + "admindoc": "https://phpsysinfo.github.io/phpsysinfo/", + "code": "https://github.com/phpsysinfo/phpsysinfo/" + }, "license": "GPL-3.0-only", "maintainer": { "name": "inrepublica", "email": "duvalmickael@gmail.com" }, "requirements": { - "yunohost": ">= 4.1.0" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -25,8 +32,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "domain.org" + "type": "domain" }, { "name": "path", @@ -36,8 +42,7 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", diff --git a/scripts/install b/scripts/install index d0c3f54..0b51353 100644 --- a/scripts/install +++ b/scripts/install @@ -119,8 +119,6 @@ ynh_script_progression --message="Configuring permissions..." # Make app public if necessary if [ $is_public -eq 1 ] then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. ynh_permission_update --permission="main" --add="visitors" fi diff --git a/scripts/restore b/scripts/restore index 3da6d35..62e16f9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -37,10 +37,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS diff --git a/scripts/upgrade b/scripts/upgrade index 0a80a17..af63d9d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) display_mode=$(ynh_app_setting_get --app=$app --key=display_mode) @@ -27,7 +26,6 @@ display_mode=$(ynh_app_setting_get --app=$app --key=display_mode) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) @@ -52,15 +50,6 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/var/www/$app @@ -94,6 +83,10 @@ then ynh_setup_source --dest_dir="$final_path" fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #=================================================