diff --git a/conf/config.ini b/conf/config.ini index 7ebe140..9969356 100644 --- a/conf/config.ini +++ b/conf/config.ini @@ -36,10 +36,13 @@ forest = false disable_drafts = false single_user = __SINGLE_USER__ open_registration = true +open_deletion = true min_username_len = 3 max_blogs = 4 federation = true public_stats = true +monetization = false +notes_only = false private = false local_timeline = true user_invites = diff --git a/conf/nginx.conf b/conf/nginx.conf index 7a4e6b8..4de64d1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -15,10 +15,10 @@ location ~ ^/(css|img|js|fonts)/ { } location __PATH__/ { - proxy_pass http://localhost:__PORT__; - proxy_set_header Host $http_host; + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; + proxy_pass http://127.0.0.1:__PORT__; proxy_redirect off; # Include SSOWAT user panel. diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..8bf9cd5 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,8 @@ +* 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 + +* 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. diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/screenshots1.png b/doc/screenshots/screenshots1.png new file mode 100644 index 0000000..daf82b9 Binary files /dev/null and b/doc/screenshots/screenshots1.png differ diff --git a/doc/screenshots/screenshots2.png b/doc/screenshots/screenshots2.png new file mode 100644 index 0000000..748d1c5 Binary files /dev/null and b/doc/screenshots/screenshots2.png differ diff --git a/manifest.json b/manifest.json index d984bee..4de4da6 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,13 @@ }, "version": "0.13.0~ynh1", "url": "https://writefreely.org", + "upstream": { + "license": "AGPL-3.0-or-later", + "website": "https://writefreely.org", + "demo": "https://write.as/new", + "userdoc": "https://writefreely.org/start", + "code": "https://github.com/writeas/writefreely" + }, "license": "AGPL-3.0-or-later", "maintainer": { "name": "yalh76" diff --git a/scripts/backup b/scripts/backup index a03e0e6..98d9a89 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ynh_clean_check_starting + true } # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/install b/scripts/install index f594294..e64ebea 100755 --- a/scripts/install +++ b/scripts/install @@ -85,7 +85,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port ynh_script_progression --message="Configuring system user..." # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # CREATE A MYSQL DATABASE diff --git a/scripts/restore b/scripts/restore index 11b8ae4..9335e33 100755 --- a/scripts/restore +++ b/scripts/restore @@ -32,7 +32,6 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -59,7 +58,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Recreating the dedicated system user..." # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # RESTORE THE APP MAIN DIR @@ -79,6 +78,7 @@ chown -R $app:www-data "$final_path" #================================================= ynh_script_progression --message="Restoring the MySQL database..." +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql diff --git a/scripts/upgrade b/scripts/upgrade index bf9fac0..3a5e443 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,6 +36,30 @@ ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + ynh_clean_check_starting + # Restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# STANDARD UPGRADE STEPS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." + +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Write Freely" + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -71,37 +95,13 @@ if ! ynh_permission_exists --permission="api"; then ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - ynh_clean_check_starting - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Stopping a systemd service..." - -ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Write Freely" - #================================================= # CREATE DEDICATED USER #================================================= ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE