diff --git a/check_process b/check_process index 91262e5..58ecacd 100644 --- a/check_process +++ b/check_process @@ -1,8 +1,8 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - admin="john" (USER) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + admin="john" + is_public=1 password="pass" single_user=1 ; Checks @@ -27,6 +27,8 @@ upgrade=1 from_commit=b387e4186a02c387d734cf25f4fed9283c01d55f # 0.13.0~ynh1 upgrade=1 from_commit=06afb5c5a1896185eec6e63ffcb929f0216db2ec + # 0.13.1~ynh1 + upgrade=1 from_commit=e30ec378dc703227fcfe542d19f35e2838192094 backup_restore=1 multi_instance=1 port_already_use=0 @@ -49,3 +51,5 @@ Notification=all name=0.12.0~ynh6 ; commit=06afb5c5a1896185eec6e63ffcb929f0216db2ec name=0.13.0~ynh1 + ; commit=e30ec378dc703227fcfe542d19f35e2838192094 + name=0.13.1~ynh1 diff --git a/conf/x86-64.src b/conf/amd64.src similarity index 100% rename from conf/x86-64.src rename to conf/amd64.src diff --git a/conf/arm.src b/conf/armel.src similarity index 100% rename from conf/arm.src rename to conf/armel.src diff --git a/conf/nginx.conf b/conf/nginx.conf index f80bb1e..805f93e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,9 +1,3 @@ -#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; - -if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..94f1ade --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,5 @@ +WriteFreely is a beautifully pared-down blogging platform that's simple on the surface, yet powerful underneath. + +Can be run as Single User Blog or Multi User Instance. + +Each User can be limited from 1 to unlimited blogs. \ No newline at end of file diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 8bf9cd5..3084b40 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,8 +1,6 @@ -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * **WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld - * i386 architectures not supported - * No LDAP and no HTTP auth supported +* **WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld +* i386 architectures not supported +* No LDAP and no HTTP auth supported -* Other infos that people should be aware of, such as: - * If User Mode is configured Multiple users, the app be used by multiple users - * Additionals parameters can be configured in Settings / Admin settings. +* If User Mode is configured Multiple users, the app be used by multiple users +* Additionals parameters can be configured in Settings / Admin settings. diff --git a/manifest.json b/manifest.json index a0b2ef4..bae4b45 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "For starting a minimalist, federated blog or an entire community.", "fr": "Permet de créer un blog fédéré minimaliste ou une communauté entière." }, - "version": "0.13.1~ynh1", + "version": "0.13.1~ynh2", "url": "https://writefreely.org", "upstream": { "license": "AGPL-3.0-or-later", @@ -20,7 +20,7 @@ "name": "yalh76" }, "requirements": { - "yunohost": ">= 4.1.3" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -28,16 +28,14 @@ "mysql" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", @@ -46,8 +44,7 @@ }, { "name": "password", - "type": "password", - "example": "Choose a password" + "type": "password" }, { "name": "single_user", diff --git a/scripts/change_url b/scripts/change_url index e946b47..dcc7c61 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -115,11 +115,6 @@ ynh_script_progression --message="Modifying a config file..." ynh_backup_if_checksum_is_different --file="$final_path/config.ini" ynh_replace_string --match_string="host =.*" --replace_string="host = https://$new_domain" --target_file="$final_path/config.ini" -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= -ynh_script_progression --message="Storingthe config file checksum..." - # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$final_path/config.ini" diff --git a/scripts/install b/scripts/install index e64ebea..ff323db 100755 --- a/scripts/install +++ b/scripts/install @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_detect_arch__2 source /usr/share/yunohost/helpers #================================================= @@ -32,7 +31,7 @@ is_public=$YNH_APP_ARG_IS_PUBLIC password=$YNH_APP_ARG_PASSWORD single_user=$YNH_APP_ARG_SINGLE_USER -architecture=$(ynh_detect_arch) +architecture=$YNH_ARCH # Bypass package_checker name not compatible with writefreely if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then @@ -123,7 +122,7 @@ ynh_add_nginx_config #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a config file..." +ynh_script_progression --message="Adding a configuration file..." ynh_add_config --template="../conf/config.ini" --destination="$final_path/config.ini" @@ -144,9 +143,9 @@ ynh_add_systemd_config ynh_script_progression --message="Making setup..." pushd $final_path - sudo -u $app ./writefreely --init-db - sudo -u $app ./writefreely --gen-keys - sudo -u $app ./writefreely --create-admin "$admin":"$password" + ynh_exec_as $app ./writefreely --init-db + ynh_exec_as $app ./writefreely --gen-keys + ynh_exec_as $app ./writefreely --create-admin "$admin":"$password" popd #================================================= diff --git a/scripts/remove b/scripts/remove index 6d6f045..112ccaa 100755 --- a/scripts/remove +++ b/scripts/remove @@ -67,14 +67,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." - -# Remove the app-specific logrotate config -ynh_remove_logrotate - #================================================= # CLOSE A PORT #================================================= diff --git a/scripts/restore b/scripts/restore index 9335e33..0314885 100755 --- a/scripts/restore +++ b/scripts/restore @@ -38,8 +38,6 @@ db_user=$db_name #================================================= 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 " diff --git a/scripts/upgrade b/scripts/upgrade index 587154b..36a923a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_detect_arch__2 source /usr/share/yunohost/helpers #================================================= @@ -27,7 +26,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) port=$(ynh_app_setting_get --app=$app --key=port) single_user=$(ynh_app_setting_get --app=$app --key=single_user) -architecture=$(ynh_detect_arch) +architecture=$YNH_ARCH #================================================= # CHECK VERSION @@ -136,15 +135,15 @@ ynh_script_progression --message="Making the upgrade..." pushd $final_path ynh_mysql_execute_as_root --sql="ALTER DATABASE $db_name CHARACTER SET latin1 COLLATE latin1_swedish_ci;" --database=$db_name - sudo -u $app ./writefreely db migrate - sudo -u $app ./writefreely --migrate - sudo -u $app ./writefreely keys generate + ynh_exec_as $app ./writefreely db migrate + ynh_exec_as $app ./writefreely --migrate + ynh_exec_as $app ./writefreely keys generate popd #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a config file..." +ynh_script_progression --message="Updating a configuration file..." ynh_add_config --template="../conf/config.ini" --destination="$final_path/config.ini" diff --git a/scripts/ynh_detect_arch__2 b/scripts/ynh_detect_arch__2 deleted file mode 100644 index b1c7375..0000000 --- a/scripts/ynh_detect_arch__2 +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Check the architecture -# -# example: architecture=$(ynh_detect_arch) -# -# usage: ynh_detect_arch -# -# Requires YunoHost version 2.2.4 or higher. - -ynh_detect_arch(){ - local architecture - if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm64" - elif [ -n "$(uname -m | grep 64)" ]; then - architecture="x86-64" - elif [ -n "$(uname -m | grep 86)" ]; then - architecture="i386" - elif [ -n "$(uname -m | grep arm)" ]; then - architecture="arm" - else - architecture="unknown" - fi - echo $architecture -}