mirror of
https://github.com/YunoHost-Apps/writefreely_ynh.git
synced 2024-09-03 20:36:02 +02:00
commit
06afb5c5a1
18 changed files with 197 additions and 108 deletions
74
README.md
74
README.md
|
@ -1,67 +1,49 @@
|
||||||
|
<!--
|
||||||
|
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||||
|
It shall NOT be edited by hand.
|
||||||
|
-->
|
||||||
|
|
||||||
# WriteFreely for YunoHost
|
# WriteFreely for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/writefreely)  
|
[](https://dash.yunohost.org/appci/app/writefreely)  
|
||||||
[](https://install-app.yunohost.org/?app=writefreely)
|
[](https://install-app.yunohost.org/?app=writefreely)
|
||||||
|
|
||||||
> *This package allows you to install WriteFreely quickly and simply on a YunoHost server.
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
|
> *This package allows you to install WriteFreely quickly and simply on a YunoHost server.
|
||||||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
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.
|
For starting a minimalist, federated blog or an entire community.
|
||||||
|
|
||||||
Each User can be limited from 1 to unlimited blogs.
|
**Shipped version:** 0.13.0~ynh1
|
||||||
|
|
||||||
**Shipped version:** v0.12.0
|
**Demo:** https://write.as/new
|
||||||
|
|
||||||
## Important points to read before installing
|
|
||||||
|
|
||||||
**WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||

|
## Disclaimers / important information
|
||||||
|
|
||||||
## Demo
|
* 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
|
||||||
|
|
||||||
* [Official demo](https://write.as/new)
|
* 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.
|
||||||
|
|
||||||
## Configuration
|
## Documentation and resources
|
||||||
|
|
||||||
Additionals parameters can be configure in Settings / admin settings.
|
* Official app website: https://writefreely.org
|
||||||
|
* Official user documentation: https://writefreely.org/start
|
||||||
## Documentation
|
* Upstream app code repository: https://github.com/writeas/writefreely
|
||||||
|
* YunoHost documentation for this app: https://yunohost.org/app_writefreely
|
||||||
* Official documentation: https://writefreely.org/start
|
* Report a bug: https://github.com/YunoHost-Apps/writefreely_ynh/issues
|
||||||
|
|
||||||
## YunoHost specific features
|
|
||||||
|
|
||||||
#### Multi-user support
|
|
||||||
|
|
||||||
No LDAP and no HTTP auth supported
|
|
||||||
|
|
||||||
If User Mode is configured Multiple users, the app be used by multiple users
|
|
||||||
|
|
||||||
#### Supported architectures
|
|
||||||
|
|
||||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/writefreely/)
|
|
||||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/writefreely/)
|
|
||||||
|
|
||||||
## Limitations
|
|
||||||
|
|
||||||
* No known limitations.
|
|
||||||
|
|
||||||
## Links
|
|
||||||
|
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/writefreely_ynh/issues
|
|
||||||
* App website: https://writefreely.org/
|
|
||||||
* Upstream app repository: https://github.com/writeas/writefreely
|
|
||||||
* YunoHost website: https://yunohost.org/
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Developer info
|
## Developer info
|
||||||
|
|
||||||
|
@ -73,3 +55,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/writefreely_ynh/tree/
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade writefreely -u https://github.com/YunoHost-Apps/writefreely_ynh/tree/testing --debug
|
sudo yunohost app upgrade writefreely -u https://github.com/YunoHost-Apps/writefreely_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
55
README_fr.md
Normal file
55
README_fr.md
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# WriteFreely pour YunoHost
|
||||||
|
|
||||||
|
[](https://dash.yunohost.org/appci/app/writefreely)  
|
||||||
|
[](https://install-app.yunohost.org/?app=writefreely)
|
||||||
|
|
||||||
|
*[Read this readme in english.](./README.md)*
|
||||||
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
|
> *Ce package vous permet d'installer WriteFreely rapidement et simplement sur un serveur YunoHost.
|
||||||
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
|
## Vue d'ensemble
|
||||||
|
|
||||||
|
Permet de créer un blog fédéré minimaliste ou une communauté entière.
|
||||||
|
|
||||||
|
**Version incluse :** 0.13.0~ynh1
|
||||||
|
|
||||||
|
**Démo :** https://write.as/new
|
||||||
|
|
||||||
|
## Captures d'écran
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
## 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
|
||||||
|
* 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.
|
||||||
|
|
||||||
|
## Documentations et ressources
|
||||||
|
|
||||||
|
* Site officiel de l'app : https://writefreely.org
|
||||||
|
* Documentation officielle utilisateur : https://writefreely.org/start
|
||||||
|
* Dépôt de code officiel de l'app : https://github.com/writeas/writefreely
|
||||||
|
* Documentation YunoHost pour cette app : https://yunohost.org/app_writefreely
|
||||||
|
* Signaler un bug : https://github.com/YunoHost-Apps/writefreely_ynh/issues
|
||||||
|
|
||||||
|
## Informations pour les développeurs
|
||||||
|
|
||||||
|
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/writefreely_ynh/tree/testing).
|
||||||
|
|
||||||
|
Pour essayer la branche testing, procédez comme suit.
|
||||||
|
```
|
||||||
|
sudo yunohost app install https://github.com/YunoHost-Apps/writefreely_ynh/tree/testing --debug
|
||||||
|
ou
|
||||||
|
sudo yunohost app upgrade writefreely -u https://github.com/YunoHost-Apps/writefreely_ynh/tree/testing --debug
|
||||||
|
```
|
||||||
|
|
||||||
|
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
|
@ -23,6 +23,8 @@
|
||||||
upgrade=1 from_commit=5ac207e14985bda77dc797353902548696622b41
|
upgrade=1 from_commit=5ac207e14985bda77dc797353902548696622b41
|
||||||
# 0.12.0~ynh4
|
# 0.12.0~ynh4
|
||||||
upgrade=1 from_commit=d75ccbc460b04ef95f3d8b1a72ee77fc7815c6a2
|
upgrade=1 from_commit=d75ccbc460b04ef95f3d8b1a72ee77fc7815c6a2
|
||||||
|
# 0.12.0~ynh6
|
||||||
|
upgrade=1 from_commit=b387e4186a02c387d734cf25f4fed9283c01d55f
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
|
@ -41,3 +43,5 @@ Notification=all
|
||||||
name=0.12.0~ynh3
|
name=0.12.0~ynh3
|
||||||
; commit=d75ccbc460b04ef95f3d8b1a72ee77fc7815c6a2
|
; commit=d75ccbc460b04ef95f3d8b1a72ee77fc7815c6a2
|
||||||
name=0.12.0~ynh4
|
name=0.12.0~ynh4
|
||||||
|
; commit=b387e4186a02c387d734cf25f4fed9283c01d55f
|
||||||
|
name=0.12.0~ynh6
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.12.0/writefreely_0.12.0_linux_arm7.tar.gz
|
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.13.0/writefreely_0.13.0_linux_arm7.tar.gz
|
||||||
SOURCE_SUM=2b05f0923de85de95c7e051eeb58d25d1366c1871d80c8b19691c4d8f238615e
|
SOURCE_SUM=7e3e900c9cd135f912f12f2938a6987e19b2d5e63c7155a0ef4b272506dd86a3
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.12.0/writefreely_0.12.0_linux_arm64.tar.gz
|
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.13.0/writefreely_0.13.0_linux_arm64.tar.gz
|
||||||
SOURCE_SUM=d1efb86779abd253076ba50eba973304f2e3bf3f1e2ec8c11f09ef177d860507
|
SOURCE_SUM=ba1ad53b30c537059b8af29cbf3406b78efcc7bf10b8224bdcacdc1b56b9a1e1
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -10,6 +10,7 @@ static_parent_dir =
|
||||||
pages_parent_dir =
|
pages_parent_dir =
|
||||||
keys_parent_dir =
|
keys_parent_dir =
|
||||||
hash_seed =
|
hash_seed =
|
||||||
|
gopher_port = 0
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
type = mysql
|
type = mysql
|
||||||
|
@ -19,32 +20,37 @@ password = __DB_PWD__
|
||||||
database = __DB_NAME__
|
database = __DB_NAME__
|
||||||
host = localhost
|
host = localhost
|
||||||
port = 3306
|
port = 3306
|
||||||
|
tls = false
|
||||||
|
|
||||||
[app]
|
[app]
|
||||||
site_name = WriteFreely
|
site_name = WriteFreely
|
||||||
site_description = WriteFreely_Blogs
|
site_description = WriteFreely_Blogs
|
||||||
host = __DOMAIN__
|
host = https://__DOMAIN__
|
||||||
theme = write
|
theme = write
|
||||||
editor =
|
editor =
|
||||||
disable_js = false
|
disable_js = false
|
||||||
webfonts = true
|
webfonts = true
|
||||||
landing =
|
landing =
|
||||||
simple_nav = false
|
simple_nav = false
|
||||||
wf_modesty = false
|
wf_modesty = false
|
||||||
chorus = false
|
chorus = false
|
||||||
forest = false
|
forest = false
|
||||||
disable_drafts = false
|
disable_drafts = false
|
||||||
single_user = __SINGLE_USER__
|
single_user = __SINGLE_USER__
|
||||||
open_registration = true
|
open_registration = true
|
||||||
min_username_len = 3
|
open_deletion = true
|
||||||
max_blogs = 4
|
min_username_len = 3
|
||||||
federation = true
|
max_blogs = 1
|
||||||
public_stats = true
|
federation = true
|
||||||
private = false
|
public_stats = true
|
||||||
local_timeline = true
|
monetization = false
|
||||||
user_invites =
|
notes_only = false
|
||||||
default_visibility =
|
private = false
|
||||||
update_checks = false
|
local_timeline = true
|
||||||
|
user_invites =
|
||||||
|
default_visibility =
|
||||||
|
update_checks = false
|
||||||
|
disable_password_auth = false
|
||||||
|
|
||||||
[oauth.slack]
|
[oauth.slack]
|
||||||
client_id =
|
client_id =
|
||||||
|
@ -70,3 +76,27 @@ display_name =
|
||||||
callback_proxy =
|
callback_proxy =
|
||||||
callback_proxy_api =
|
callback_proxy_api =
|
||||||
|
|
||||||
|
[oauth.gitea]
|
||||||
|
client_id =
|
||||||
|
client_secret =
|
||||||
|
host =
|
||||||
|
display_name =
|
||||||
|
callback_proxy =
|
||||||
|
callback_proxy_api =
|
||||||
|
|
||||||
|
[oauth.generic]
|
||||||
|
client_id =
|
||||||
|
client_secret =
|
||||||
|
host =
|
||||||
|
display_name =
|
||||||
|
callback_proxy =
|
||||||
|
callback_proxy_api =
|
||||||
|
token_endpoint =
|
||||||
|
inspect_endpoint =
|
||||||
|
auth_endpoint =
|
||||||
|
scope =
|
||||||
|
allow_disconnect = false
|
||||||
|
map_user_id =
|
||||||
|
map_username =
|
||||||
|
map_display_name =
|
||||||
|
map_email =
|
||||||
|
|
|
@ -15,10 +15,10 @@ location ~ ^/(css|img|js|fonts)/ {
|
||||||
}
|
}
|
||||||
|
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
proxy_pass http://localhost:__PORT__;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.12.0/writefreely_0.12.0_linux_amd64.tar.gz
|
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.13.0/writefreely_0.13.0_linux_amd64.tar.gz
|
||||||
SOURCE_SUM=9563cda11cb3f789dc9ffccada48b377bf7b567b813cca7ed4706cc1c570c613
|
SOURCE_SUM=bb20ac62975f54214b22a6668796bb0ff90f857fa793c3f3fc0fc4794c5dcc82
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
0
doc/.gitkeep
Normal file
0
doc/.gitkeep
Normal file
8
doc/DISCLAIMER.md
Normal file
8
doc/DISCLAIMER.md
Normal file
|
@ -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.
|
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
BIN
doc/screenshots/screenshots1.png
Normal file
BIN
doc/screenshots/screenshots1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 388 KiB |
BIN
doc/screenshots/screenshots2.png
Normal file
BIN
doc/screenshots/screenshots2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 443 KiB |
|
@ -3,11 +3,18 @@
|
||||||
"id": "writefreely",
|
"id": "writefreely",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"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.12.0~ynh6",
|
"version": "0.13.0~ynh1",
|
||||||
"url": "https://writefreely.org",
|
"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",
|
"license": "AGPL-3.0-or-later",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "yalh76"
|
"name": "yalh76"
|
||||||
|
|
|
@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
ynh_clean_check_starting
|
true
|
||||||
}
|
}
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
|
@ -85,7 +85,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
ynh_script_progression --message="Configuring system user..."
|
ynh_script_progression --message="Configuring system user..."
|
||||||
|
|
||||||
# Create a 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
|
# CREATE A MYSQL DATABASE
|
||||||
|
|
|
@ -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)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE RESTORED
|
# 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..."
|
ynh_script_progression --message="Recreating the dedicated system user..."
|
||||||
|
|
||||||
# Create the dedicated user (if not existing)
|
# 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
|
# RESTORE THE APP MAIN DIR
|
||||||
|
@ -79,6 +78,7 @@ chown -R $app:www-data "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the MySQL database..."
|
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_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
|
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,30 @@ ynh_script_progression --message="Checking version..."
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
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
|
# 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"
|
ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true"
|
||||||
fi
|
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
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
# 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
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -138,6 +138,7 @@ 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
|
sudo -u $app ./writefreely db migrate
|
||||||
sudo -u $app ./writefreely --migrate
|
sudo -u $app ./writefreely --migrate
|
||||||
|
sudo -u $app ./writefreely keys generate
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue