mirror of
https://github.com/YunoHost-Apps/fittrackee_ynh.git
synced 2024-09-03 18:36:16 +02:00
Merge branch 'master' into testing
This commit is contained in:
commit
aca06e50e8
6 changed files with 18 additions and 39 deletions
|
@ -15,8 +15,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
## Overview
|
||||
|
||||
BookWyrm is a social network for tracking your reading, talking about books, writing reviews, and discovering what to read next.
|
||||
|
||||
BookWyrm is a social network for tracking your reading, talking about books, writing reviews, and discovering what to read next.
|
||||
|
||||
**Shipped version:** 0.5.3~ynh1
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ BookWyrm est un réseau social pour garder la trace de vos lectures, parler de l
|
|||
|
||||
Ce projet est encore jeune et n'est pas, pour le moment, très stable, faites preuve de prudence lors de son utilisation en production.
|
||||
|
||||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : <https://joinbookwyrm.com/fr/>
|
||||
|
|
|
@ -1 +1 @@
|
|||
BookWyrm is a social network for tracking your reading, talking about books, writing reviews, and discovering what to read next.
|
||||
BookWyrm is a social network for tracking your reading, talking about books, writing reviews, and discovering what to read next.
|
||||
|
|
|
@ -102,7 +102,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
|||
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
@ -157,7 +157,6 @@ chmod 750 "$datadir"
|
|||
chmod -R o-rwx "$datadir"
|
||||
chown -R $app:www-data "$datadir"
|
||||
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
@ -184,7 +183,6 @@ yunohost service add "${app}-beat"
|
|||
yunohost service add "${app}-server"
|
||||
yunohost service add "${app}-worker"
|
||||
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
@ -201,7 +199,7 @@ ynh_systemd_action --service_name="${app}-worker" --action="start" --log_path="s
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||
|
||||
# Make app public if necessary
|
||||
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
# Everyone can access the app.
|
||||
|
@ -211,7 +209,6 @@ fi
|
|||
|
||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||
|
||||
|
||||
ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -95,7 +95,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -
|
|||
# Remove the dedicated NGINX config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -114,23 +113,6 @@ then
|
|||
ynh_exec_warn_less yunohost firewall disallow TCP $port
|
||||
fi
|
||||
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC REMOVE
|
||||
#=================================================
|
||||
# REMOVE VARIOUS FILES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing various files..." --weight=1
|
||||
|
||||
# Remove a cron file
|
||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||
|
||||
# Remove a directory securely
|
||||
ynh_secure_remove --file="/etc/$app"
|
||||
|
||||
# Remove the log files
|
||||
ynh_secure_remove --file="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -53,6 +53,18 @@ ynh_script_progression --message="Restoring the NGINX web server configuration..
|
|||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE POSTGRESQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=1
|
||||
|
||||
ynh_psql_test_if_first_run
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_psql_execute_as_root --sql="ALTER USER $db_user CREATEDB;"
|
||||
ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -68,12 +80,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
# FIXME: this should be managed by the core in the future
|
||||
# Here, as a packager, you may have to tweak the ownerhsip/permissions
|
||||
# such that the appropriate users (e.g. maybe www-data) can access
|
||||
# files in some cases.
|
||||
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
||||
# this will be treated as a security issue.
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
@ -87,12 +94,6 @@ ynh_restore_file --origin_path="$datadir" --not_mandatory
|
|||
|
||||
mkdir -p $datadir
|
||||
|
||||
# FIXME: this should be managed by the core in the future
|
||||
# Here, as a packager, you may have to tweak the ownerhsip/permissions
|
||||
# such that the appropriate users (e.g. maybe www-data) can access
|
||||
# files in some cases.
|
||||
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
||||
# this will be treated as a security issue.
|
||||
chmod 750 "$datadir"
|
||||
chmod -R o-rwx "$datadir"
|
||||
chown -R $app:www-data "$datadir"
|
||||
|
@ -118,7 +119,6 @@ ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
|||
ynh_psql_execute_as_root --sql="ALTER USER $db_user CREATEDB;"
|
||||
ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name"
|
||||
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue