mirror of
https://github.com/YunoHost-Apps/writefreely_ynh.git
synced 2024-09-03 20:36:02 +02:00
Merge pull request #100 from YunoHost-Apps/testing
Apply last example_ynh
This commit is contained in:
commit
728daca58e
15 changed files with 55 additions and 91 deletions
20
README.md
20
README.md
|
@ -15,9 +15,13 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
For starting a minimalist, federated blog or an entire community.
|
WriteFreely is a beautifully pared-down blogging platform that's simple on the surface, yet powerful underneath.
|
||||||
|
|
||||||
**Shipped version:** 0.13.1~ynh1
|
Can be run as Single User Blog or Multi User Instance.
|
||||||
|
|
||||||
|
Each User can be limited from 1 to unlimited blogs.
|
||||||
|
|
||||||
|
**Shipped version:** 0.13.1~ynh2
|
||||||
|
|
||||||
**Demo:** https://write.as/new
|
**Demo:** https://write.as/new
|
||||||
|
|
||||||
|
@ -28,14 +32,12 @@ For starting a minimalist, federated blog or an entire community.
|
||||||
|
|
||||||
## Disclaimers / important information
|
## Disclaimers / important information
|
||||||
|
|
||||||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
* **WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
|
||||||
* **WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
|
* i386 architectures not supported
|
||||||
* i386 architectures not supported
|
* No LDAP and no HTTP auth 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
|
||||||
* If User Mode is configured Multiple users, the app be used by multiple users
|
* Additionals parameters can be configured in Settings / Admin settings.
|
||||||
* Additionals parameters can be configured in Settings / Admin settings.
|
|
||||||
|
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
|
|
20
README_fr.md
20
README_fr.md
|
@ -11,9 +11,13 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
## Vue d'ensemble
|
## Vue d'ensemble
|
||||||
|
|
||||||
Permet de créer un blog fédéré minimaliste ou une communauté entière.
|
WriteFreely is a beautifully pared-down blogging platform that's simple on the surface, yet powerful underneath.
|
||||||
|
|
||||||
**Version incluse :** 0.13.1~ynh1
|
Can be run as Single User Blog or Multi User Instance.
|
||||||
|
|
||||||
|
Each User can be limited from 1 to unlimited blogs.
|
||||||
|
|
||||||
|
**Version incluse :** 0.13.1~ynh2
|
||||||
|
|
||||||
**Démo :** https://write.as/new
|
**Démo :** https://write.as/new
|
||||||
|
|
||||||
|
@ -24,14 +28,12 @@ Permet de créer un blog fédéré minimaliste ou une communauté entière.
|
||||||
|
|
||||||
## Avertissements / informations importantes
|
## Avertissements / informations importantes
|
||||||
|
|
||||||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
* **WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
|
||||||
* **WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
|
* i386 architectures not supported
|
||||||
* i386 architectures not supported
|
* No LDAP and no HTTP auth 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
|
||||||
* If User Mode is configured Multiple users, the app be used by multiple users
|
* Additionals parameters can be configured in Settings / Admin settings.
|
||||||
* Additionals parameters can be configured in Settings / Admin settings.
|
|
||||||
|
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
admin="john" (USER)
|
admin="john"
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1
|
||||||
password="pass"
|
password="pass"
|
||||||
single_user=1
|
single_user=1
|
||||||
; Checks
|
; Checks
|
||||||
|
@ -27,6 +27,8 @@
|
||||||
upgrade=1 from_commit=b387e4186a02c387d734cf25f4fed9283c01d55f
|
upgrade=1 from_commit=b387e4186a02c387d734cf25f4fed9283c01d55f
|
||||||
# 0.13.0~ynh1
|
# 0.13.0~ynh1
|
||||||
upgrade=1 from_commit=06afb5c5a1896185eec6e63ffcb929f0216db2ec
|
upgrade=1 from_commit=06afb5c5a1896185eec6e63ffcb929f0216db2ec
|
||||||
|
# 0.13.1~ynh1
|
||||||
|
upgrade=1 from_commit=e30ec378dc703227fcfe542d19f35e2838192094
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
|
@ -49,3 +51,5 @@ Notification=all
|
||||||
name=0.12.0~ynh6
|
name=0.12.0~ynh6
|
||||||
; commit=06afb5c5a1896185eec6e63ffcb929f0216db2ec
|
; commit=06afb5c5a1896185eec6e63ffcb929f0216db2ec
|
||||||
name=0.13.0~ynh1
|
name=0.13.0~ynh1
|
||||||
|
; commit=e30ec378dc703227fcfe542d19f35e2838192094
|
||||||
|
name=0.13.1~ynh1
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
|
||||||
|
|
||||||
location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) {
|
location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) {
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
5
doc/DESCRIPTION.md
Normal file
5
doc/DESCRIPTION.md
Normal file
|
@ -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.
|
|
@ -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
|
||||||
* **WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
|
* i386 architectures not supported
|
||||||
* i386 architectures not supported
|
* No LDAP and no HTTP auth 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
|
||||||
* If User Mode is configured Multiple users, the app be used by multiple users
|
* Additionals parameters can be configured in Settings / Admin settings.
|
||||||
* Additionals parameters can be configured in Settings / Admin settings.
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "For starting a minimalist, federated blog or an entire community.",
|
"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."
|
"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",
|
"url": "https://writefreely.org",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
"name": "yalh76"
|
"name": "yalh76"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.1.3"
|
"yunohost": ">= 4.3.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -28,16 +28,14 @@
|
||||||
"mysql"
|
"mysql"
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install": [
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain"
|
||||||
"example": "example.com"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
"type": "user",
|
"type": "user"
|
||||||
"example": "johndoe"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
|
@ -46,8 +44,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "password",
|
"name": "password",
|
||||||
"type": "password",
|
"type": "password"
|
||||||
"example": "Choose a password"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "single_user",
|
"name": "single_user",
|
||||||
|
|
|
@ -115,11 +115,6 @@ ynh_script_progression --message="Modifying a config file..."
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/config.ini"
|
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"
|
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.
|
# Recalculate and store the checksum of the file for the next upgrade.
|
||||||
ynh_store_file_checksum --file="$final_path/config.ini"
|
ynh_store_file_checksum --file="$final_path/config.ini"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source ynh_detect_arch__2
|
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -32,7 +31,7 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
single_user=$YNH_APP_ARG_SINGLE_USER
|
single_user=$YNH_APP_ARG_SINGLE_USER
|
||||||
|
|
||||||
architecture=$(ynh_detect_arch)
|
architecture=$YNH_ARCH
|
||||||
|
|
||||||
# Bypass package_checker name not compatible with writefreely
|
# Bypass package_checker name not compatible with writefreely
|
||||||
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
||||||
|
@ -123,7 +122,7 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CONFIGURATION
|
# 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"
|
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..."
|
ynh_script_progression --message="Making setup..."
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
sudo -u $app ./writefreely --init-db
|
ynh_exec_as $app ./writefreely --init-db
|
||||||
sudo -u $app ./writefreely --gen-keys
|
ynh_exec_as $app ./writefreely --gen-keys
|
||||||
sudo -u $app ./writefreely --create-admin "$admin":"$password"
|
ynh_exec_as $app ./writefreely --create-admin "$admin":"$password"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -67,14 +67,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..."
|
||||||
# Remove the dedicated NGINX config
|
# Remove the dedicated NGINX config
|
||||||
ynh_remove_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
|
# CLOSE A PORT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -38,8 +38,6 @@ db_user=$db_name
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..."
|
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 \
|
test ! -d $final_path \
|
||||||
|| ynh_die --message="There is already a directory: $final_path "
|
|| ynh_die --message="There is already a directory: $final_path "
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source ynh_detect_arch__2
|
|
||||||
source /usr/share/yunohost/helpers
|
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)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
single_user=$(ynh_app_setting_get --app=$app --key=single_user)
|
single_user=$(ynh_app_setting_get --app=$app --key=single_user)
|
||||||
|
|
||||||
architecture=$(ynh_detect_arch)
|
architecture=$YNH_ARCH
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
|
@ -136,15 +135,15 @@ ynh_script_progression --message="Making the upgrade..."
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
ynh_mysql_execute_as_root --sql="ALTER DATABASE $db_name CHARACTER SET latin1 COLLATE latin1_swedish_ci;" --database=$db_name
|
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
|
ynh_exec_as $app ./writefreely db migrate
|
||||||
sudo -u $app ./writefreely --migrate
|
ynh_exec_as $app ./writefreely --migrate
|
||||||
sudo -u $app ./writefreely keys generate
|
ynh_exec_as $app ./writefreely keys generate
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# 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"
|
ynh_add_config --template="../conf/config.ini" --destination="$final_path/config.ini"
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue