mirror of
https://github.com/YunoHost-Apps/hedgedoc_ynh.git
synced 2024-09-03 19:25:52 +02:00
small fixes
This commit is contained in:
parent
f8511cb20a
commit
9883e7e655
9 changed files with 25 additions and 26 deletions
|
@ -45,6 +45,7 @@ You can configure HedgeDoc by editing this file `/var/www/hedgedoc/config.json`
|
|||
## Links
|
||||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/hedgedoc_ynh/issues
|
||||
* App website: https://hedgedoc.org
|
||||
* Upstream app repository: https://github.com/hedgedoc/hedgedoc
|
||||
* YunoHost website: https://yunohost.org/
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ Vous pouvez configurer HedgeDoc en modifiant le fichier `/var/www/hedgedoc/confi
|
|||
## Liens
|
||||
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/hedgedoc_ynh/issues
|
||||
* Site de l'application : https://hedgedoc.org
|
||||
* Dépôt de l'application principale : https://github.com/hedgedoc/hedgedoc
|
||||
* Site web YunoHost : https://yunohost.org/
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
location ^~ __PATH__/ {
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"name": ""
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.0.0"
|
||||
"yunohost": ">= 4.0.8"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -107,7 +107,7 @@ fi
|
|||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
# CONFIGURE CODIMD
|
||||
# CONFIGURE HEDGEDOC
|
||||
#=================================================
|
||||
|
||||
ynh_backup_if_checksum_is_different --file="$final_path/config.json"
|
||||
|
|
|
@ -108,7 +108,7 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..." --weight=3
|
||||
ynh_script_progression --message="Configuring system user..." --weight=2
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
@ -116,16 +116,14 @@ ynh_system_user_create --username=$app --home_dir=$final_path
|
|||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#==============================================
|
||||
# INSTALL CODIMD
|
||||
# INSTALL HEDGEDOC
|
||||
#==============================================
|
||||
ynh_script_progression --message="Building HedgeDoc... (this will take some time and resources!)" --weight=240
|
||||
ynh_script_progression --message="Building HedgeDoc... (this will take some time and resources!)" --weight=10
|
||||
|
||||
pushd "$final_path" || ynh_die
|
||||
|
||||
ynh_use_nodejs
|
||||
bin/setup
|
||||
ynh_exec_warn_less yarn run build
|
||||
|
||||
popd || ynh_die
|
||||
|
||||
#=================================================
|
||||
|
@ -141,7 +139,7 @@ ynh_add_systemd_config
|
|||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..."
|
||||
ynh_script_progression --message="Modifying a config file..." --weight=1
|
||||
|
||||
cp ../conf/config.json.example "$final_path/config.json"
|
||||
|
||||
|
@ -170,7 +168,7 @@ ynh_store_file_checksum --file="$final_path/.sequelizerc"
|
|||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Securing files and directories..."
|
||||
ynh_script_progression --message="Securing files and directories..." --weight=1
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:$app $final_path
|
||||
|
@ -178,7 +176,7 @@ chown -R $app:$app $final_path
|
|||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
|
||||
|
||||
yunohost service add $app --description "Collaborative Markdown notes" --log="/var/log/$app/$app.log"
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||
#=================================================
|
||||
|
||||
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`)
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
then
|
||||
ynh_script_progression --message="Removing $app service..." --weight=1
|
||||
|
|
|
@ -48,14 +48,14 @@ test ! -d $final_path \
|
|||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the NGINX configuration..."
|
||||
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring HedgeDoc main directory..." --weight=60
|
||||
ynh_script_progression --message="Restoring HedgeDoc main directory..." --weight=10
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
|
@ -70,7 +70,7 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring user rights..."
|
||||
ynh_script_progression --message="Restoring user rights..." --weight=2
|
||||
|
||||
# Restore permissions on app files
|
||||
chown -R $app:$app $final_path
|
||||
|
@ -80,7 +80,7 @@ chown -R $app:$app $final_path
|
|||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=7
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=6
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
@ -111,7 +111,7 @@ systemctl enable $app.service
|
|||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
|
||||
|
||||
yunohost service add $app --description "collaborative Markdown editor" --log "/var/log/$app/$app.log"
|
||||
|
||||
|
|
|
@ -29,14 +29,14 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
|||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Checking version..."
|
||||
ynh_script_progression --message="Checking version..." --weight=2
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up HedgeDoc before upgrading (may take a while)..." --weight=120
|
||||
ynh_script_progression --message="Backing up HedgeDoc before upgrading (may take a while)..." --weight=10
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
|
@ -62,7 +62,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
|||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=160
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=10
|
||||
|
||||
# Create a temporary directory
|
||||
tmpdir="$(mktemp -d)"
|
||||
|
@ -96,7 +96,7 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=18
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=10
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
|
@ -117,18 +117,16 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#==============================================
|
||||
# INSTALL CODIMD
|
||||
# INSTALL HEDGEDOC
|
||||
#==============================================
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Building HedgeDoc... (this will take some time and resources!)" --weight=160
|
||||
ynh_script_progression --message="Building HedgeDoc... (this will take some time and resources!)" --weight=10
|
||||
|
||||
pushd "$final_path" || ynh_die
|
||||
|
||||
ynh_use_nodejs
|
||||
bin/setup
|
||||
ynh_exec_warn_less yarn run build
|
||||
|
||||
popd || ynh_die
|
||||
fi
|
||||
|
||||
|
@ -169,7 +167,7 @@ ynh_add_systemd_config
|
|||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Securing files and directories..."
|
||||
ynh_script_progression --message="Securing files and directories..." --weight=1
|
||||
|
||||
# Set permissions on app files
|
||||
chown -R $app:$app $final_path
|
||||
|
@ -177,7 +175,7 @@ chown -R $app:$app $final_path
|
|||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
|
||||
|
||||
yunohost service add $app --description "Collaborative Markdown notes" --log="/var/log/$app/$app.log"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue