mirror of
https://github.com/YunoHost-Apps/mobilizon_ynh.git
synced 2024-09-03 19:46:19 +02:00
Upgrade to 1.2.1
This commit is contained in:
parent
ca8f3ab279
commit
b45351b7a0
12 changed files with 69 additions and 55 deletions
|
@ -13,7 +13,7 @@ Mobilizon aims to solve existing platform's problems to organize events in a dec
|
|||
|
||||
Mobilizon is a tool that helps you find, create and organise events. You can also create a page for your group where the members will be able to organise together.
|
||||
|
||||
**Shipped version:** 1.1.4
|
||||
**Shipped version:** 1.2.1
|
||||
|
||||
## Important points to read before installing
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
admin="john" (USER)
|
||||
domain="domain.tld"
|
||||
admin="john"
|
||||
language="fr"
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
is_public=1
|
||||
password="password"
|
||||
name="My_Mobilizon"
|
||||
; Checks
|
||||
|
@ -16,6 +16,8 @@
|
|||
upgrade=1
|
||||
# 1.1.3~ynh1
|
||||
upgrade=1 from_commit=87d34001dd0b77aed4fa7be2911bc04f58b069ee
|
||||
# 1.1.4~ynh1
|
||||
upgrade=1 from_commit=ca8f3ab279d550cb6be44d0fec4c7f36fcae8798
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=0
|
||||
|
@ -26,3 +28,5 @@ Notification=all
|
|||
;;; Upgrade options
|
||||
; commit=87d34001dd0b77aed4fa7be2911bc04f58b069ee
|
||||
name=1.1.3~ynh1
|
||||
; commit=ca8f3ab279d550cb6be44d0fec4c7f36fcae8798
|
||||
name=1.1.4~ynh1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
SOURCE_URL=https://framagit.org/framasoft/mobilizon/-/archive/1.1.4/mobilizon-1.1.4.tar.gz
|
||||
SOURCE_SUM=0d778d1ab390e0525bb3bb7383298011ea19d89075955622cf23e61e2899acd2
|
||||
SOURCE_URL=https://framagit.org/framasoft/mobilizon/-/archive/1.2.1/mobilizon-1.2.1.tar.gz
|
||||
SOURCE_SUM=b35f63b56e5ad3275b0d1d4459a8fd88bc671a422d7414d31d32f71069decced
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=mobilizon-1.1.4.tar.gz
|
||||
SOURCE_FILENAME=mobilizon-1.2.1.tar.gz
|
||||
SOURCE_EXTRACT=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):
|
||||
* **Mobilizon** require a dedicated **root domain**, eg. mobilizon.domain.tld
|
||||
* To connect as **Mobilizon** administrator, use the email address and password of the user you choose during install
|
||||
* By default registrations are closed
|
||||
* All YunoHost users are allowed to connect
|
||||
|
||||
* Other infos that people should be aware of, such as:
|
||||
* Configuration can be made in the Mobilizon administration panel.
|
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
BIN
doc/screenshots/screenshot1.jpg
Normal file
BIN
doc/screenshots/screenshot1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 KiB |
|
@ -6,8 +6,15 @@
|
|||
"en": "A decentralized and federated platform to organize events",
|
||||
"fr": "Une plateforme décentralisée et fédérée pour organiser des événements"
|
||||
},
|
||||
"version": "1.1.4~ynh1",
|
||||
"version": "1.2.1~ynh1",
|
||||
"url": "https://joinmobilizon.org/",
|
||||
"upstream": {
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"website": "https://joinmobilizon.org/",
|
||||
"demo": "https://demo.mobilizon.org",
|
||||
"userdoc": "https://docs.joinmobilizon.org",
|
||||
"code": "https://framagit.org/framasoft/mobilizon/"
|
||||
},
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"maintainer": {
|
||||
"name": "yalh76"
|
||||
|
|
|
@ -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
|
||||
|
@ -43,6 +43,12 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE DATA DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$datadir" --is_big
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -57,12 +63,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
|
||||
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||
|
||||
#=================================================
|
||||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$datadir" --is_big
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE POSTGRESQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -88,7 +88,7 @@ ynh_install_extra_app_dependencies --repo="deb http://packages.erlang-solutions.
|
|||
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
|
||||
|
||||
yunohost user create ${app}_notifs --firstname "Mobilizon" --lastname "Notifications" --mail ${app}_notifs@$domain --password "$ynh_user_password" -q 0
|
||||
yunohost user update ${app}_notifs --add-mailalias $app@$domain --add-mailforward $admin_email
|
||||
|
@ -134,17 +134,14 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
# CREATE THE DATA DIRECTORY
|
||||
# CREATE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating the data directory..."
|
||||
ynh_script_progression --message="Creating a data directory..."
|
||||
|
||||
# Define app's data directory
|
||||
datadir="/home/yunohost.app/${app}"
|
||||
datadir=/home/yunohost.app/$app
|
||||
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
||||
|
||||
ynh_app_setting_set --app=$app --key=datadir --value="$datadir"
|
||||
|
||||
# Create app folders
|
||||
mkdir -p "$datadir/"
|
||||
mkdir -p $datadir
|
||||
mkdir -p "$datadir/uploads/"
|
||||
|
||||
chmod 750 "$datadir"
|
||||
|
|
|
@ -63,7 +63,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
|
||||
|
||||
yunohost user create ${app}_notifs --firstname "Mobilizon" --lastname "Notifications" --mail ${app}_notifs@$domain --password "$ynh_user_password" -q 0
|
||||
yunohost user update ${app}_notifs --add-mailalias $app@$domain --add-mailforward $admin_email
|
||||
|
@ -80,23 +80,21 @@ chmod -R o-rwx "$final_path"
|
|||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
# RECREATE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the data directory..."
|
||||
ynh_script_progression --message="Restoring the data directory..."
|
||||
|
||||
# Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup.
|
||||
ynh_restore_file --origin_path="$datadir" --not_mandatory
|
||||
|
||||
# Create app folders
|
||||
mkdir -p "$datadir/"
|
||||
mkdir -p $datadir
|
||||
mkdir -p "$datadir/uploads/"
|
||||
|
||||
chmod 750 "$datadir"
|
||||
chmod -R o-rwx "$datadir"
|
||||
chown -R $app:$app "$datadir"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
|
|
@ -41,27 +41,6 @@ abort_if_up_to_date
|
|||
# previous function is what defines 'version', more precisely the 'previous version'
|
||||
previous_version="${version}"
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
if ! ynh_permission_exists --permission="admin"; then
|
||||
# Create the required permissions
|
||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||
fi
|
||||
|
||||
ynh_secure_remove --file="$final_path/$app/priv/data/GeoLite2-City.mmdb"
|
||||
|
||||
ynh_secure_remove --file="/usr/share/GeoIP"
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
@ -86,6 +65,27 @@ ynh_script_progression --message="Stopping a systemd service..."
|
|||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd --line_match="Stopped"
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
if ! ynh_permission_exists --permission="admin"; then
|
||||
# Create the required permissions
|
||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||
fi
|
||||
|
||||
ynh_secure_remove --file="$final_path/$app/priv/data/GeoLite2-City.mmdb"
|
||||
|
||||
ynh_secure_remove --file="/usr/share/GeoIP"
|
||||
|
||||
#=================================================
|
||||
# UPGRADE FROM PREVIOUS VERSION
|
||||
#=================================================
|
||||
|
@ -125,7 +125,7 @@ fi
|
|||
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
|
||||
|
||||
#=================================================
|
||||
# CREATE DATADIR FOLDER
|
||||
|
@ -259,7 +259,7 @@ fi
|
|||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a config file..."
|
||||
ynh_script_progression --message="Updating a configuration file..."
|
||||
|
||||
config="$final_path/$app/config/prod.secret.exs"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue