mirror of
https://github.com/YunoHost-Apps/weblate_ynh.git
synced 2024-10-01 13:35:04 +02:00
Fix
This commit is contained in:
parent
7d1f1adf60
commit
95ce729399
8 changed files with 93 additions and 51 deletions
17
doc/DISCLAIMER.md
Normal file
17
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
## GitHub
|
||||
|
||||
You'll need to give Weblate a GitHub user and a token. Please read [GitHub's documentation about token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/).
|
||||
This user will only be used to open the pull-request, each translation keep his author.
|
||||
|
||||
**SSH keys**, you will have to go in administration, and generate a public key for Weblate and add github.com so Weblate knows the fingerprint. Please note if your account already have a public key (ssh-rsa), you will have to manually add the Weblate's one to your GitHub account.
|
||||
|
||||
## Settings and upgrades
|
||||
|
||||
Almost everything related to Weblate's configuration is handled in a `settings.py` file.
|
||||
You can edit the file `$final_path/local_settings.py` to enable or disable features.
|
||||
|
||||
# Miscellaneous
|
||||
|
||||
## LDAP connexion
|
||||
|
||||
It doesn't work yet, but while [it looks doable](https://docs.weblate.org/en/latest/admin/auth.html?highlight=LDAP#ldap-authentication), I'm unsure it is a good idea to connect this kind of tools to your LDAP.
|
17
doc/DISCLAIMER_fr.md
Normal file
17
doc/DISCLAIMER_fr.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
## GitHub
|
||||
|
||||
Vous devrez donner à Weblate un utilisateur GitHub et un jeton. Veuillez lire [la documentation de GitHub sur le jeton](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/).
|
||||
Cet utilisateur ne sera utilisé que pour ouvrir la pull-request, chaque traduction garde son auteur.
|
||||
|
||||
**Clés SSH**, vous devrez vous rendre dans l'administration, générer une clé publique pour Weblate et ajouter github.com pour que Weblate connaisse l'empreinte digitale. Veuillez noter que si votre compte possède déjà une clé publique (ssh-rsa), vous devrez ajouter manuellement celle de Weblate à votre compte GitHub.
|
||||
|
||||
## Paramètres et mises à niveau
|
||||
|
||||
Presque tout ce qui concerne la configuration de Weblate est géré dans un fichier `settings.py`.
|
||||
Vous pouvez éditer le fichier `$final_path/local_settings.py` pour activer ou désactiver des fonctionnalités.
|
||||
|
||||
# Divers
|
||||
|
||||
## Connexion LDAP
|
||||
|
||||
Cela ne fonctionne pas encore, mais bien que [cela semble faisable](https://docs.weblate.org/en/latest/admin/auth.html?highlight=LDAP#ldap-authentication), je ne suis pas sûr que ce soit le cas une bonne idée de connecter ce genre d'outils à votre LDAP.
|
|
@ -3,11 +3,19 @@
|
|||
"id": "weblate",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "A translation platform using Git and Python",
|
||||
"fr": "Une plateforme de traduction utilisant Git et Python"
|
||||
"en": "Translation platform using Git and Python",
|
||||
"fr": "Plateforme de traduction utilisant Git et Python"
|
||||
},
|
||||
"version": "4.7~ynh1",
|
||||
"url": "https://weblate.org",
|
||||
"upstream": {
|
||||
"license": "AGPL-3.0",
|
||||
"website": "https://weblate.org",
|
||||
"demo": "https://translate.yunohost.org",
|
||||
"admindoc": "https://docs.weblate.org/",
|
||||
"userdoc": "https://yunohost.org/apps",
|
||||
"code": "https://github.com/WeblateOrg/weblate"
|
||||
},
|
||||
"license": "AGPL-3.0",
|
||||
"maintainer": {
|
||||
"name": "",
|
||||
|
@ -18,7 +26,7 @@
|
|||
"email": "jean-baptiste@holcroft.fr"
|
||||
}],
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.0"
|
||||
"yunohost": ">= 4.2.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -24,7 +24,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
final_path=$(ynh_app_setting_get --app="$app" --key=final_path)
|
||||
is_public=$(ynh_app_setting_get --app="$app" --key=is_public)
|
||||
|
@ -67,7 +67,7 @@ fi
|
|||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping systemd services..."
|
||||
ynh_script_progression --message="Stopping systemd services..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name="$app" --action="stop"
|
||||
ynh_systemd_action --service_name="$app-celery" --action="stop"
|
||||
|
@ -77,7 +77,7 @@ ynh_systemd_action --service_name="$app-celery" --action="stop"
|
|||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating nginx web server configuration..."
|
||||
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
||||
|
||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||
|
||||
|
@ -108,7 +108,7 @@ fi
|
|||
#=================================================
|
||||
# MODIFY SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modify weblate's config file..."
|
||||
ynh_script_progression --message="Modify weblate's config file..." --weight=1
|
||||
|
||||
settings="$final_path/venv/lib/$weblate_pypath/site-packages/weblate/settings.py"
|
||||
ynh_backup_if_checksum_is_different --file="$settings"
|
||||
|
@ -160,7 +160,7 @@ ynh_systemd_action --service_name="$app-celery" --action="start"
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating installation parameters..."
|
||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||
|
||||
final_path=/var/www/$app
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
@ -46,7 +46,7 @@ mkdir -p "$final_path"
|
|||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..."
|
||||
ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||
|
||||
ynh_app_setting_set --app="$app" --key=domain --value="$domain"
|
||||
ynh_app_setting_set --app="$app" --key=path --value="$path_url"
|
||||
|
@ -67,7 +67,7 @@ ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies"
|
|||
#=================================================
|
||||
# CREATE A PostgreSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating a PostgreSQL database..."
|
||||
ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2
|
||||
|
||||
db_name=$(ynh_sanitize_dbid --db_name="$app")
|
||||
db_user=$db_name
|
||||
|
@ -81,7 +81,7 @@ ynh_psql_setup_db --db_user="$db_user" --db_name="$db_name"
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring nginx web server..."
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
@ -89,7 +89,7 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..."
|
||||
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||
|
||||
# Hub needs a home directory with a config file
|
||||
ynh_system_user_create --username="$app" --home_dir="$final_path" --use_shell
|
||||
|
@ -97,7 +97,7 @@ ynh_system_user_create --username="$app" --home_dir="$final_path" --use_shell
|
|||
#=================================================
|
||||
# CONFIGURE HUB
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configure hub..."
|
||||
ynh_script_progression --message="Configure hub..." --weight=1
|
||||
|
||||
mkdir "$final_path/.config/"
|
||||
ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub"
|
||||
|
@ -139,7 +139,7 @@ chown -R "$app": "$final_path"
|
|||
# https://docs.weblate.org/en/latest/admin/install.html#installation
|
||||
# TODO: use --extra-search-dir=/path/to/dists
|
||||
#=================================================
|
||||
ynh_script_progression --message="Create weblate configuration file..."
|
||||
ynh_script_progression --message="Create weblate configuration file..." --weight=1
|
||||
|
||||
db_pwd=$(ynh_app_setting_get --app="$app" --key=psqlpwd)
|
||||
admin_mail=$(ynh_user_get_info --username="$admin" --key=mail)
|
||||
|
@ -192,7 +192,7 @@ ynh_store_file_checksum --file="$settings"
|
|||
#=================================================
|
||||
# SPECIFIC SETUP UWSGI
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configure uwsgi..."
|
||||
ynh_script_progression --message="Configure uwsgi..." --weight=1
|
||||
|
||||
finaluwsgiini="/etc/uwsgi/apps-available/$app.ini"
|
||||
|
||||
|
@ -201,14 +201,14 @@ ynh_add_config --template="../conf/uwsgi.ini" --destination="$finaluwsgiini"
|
|||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..."
|
||||
ynh_script_progression --message="Configuring a systemd service..." --weight=2
|
||||
|
||||
ynh_add_systemd_config --service="$app" --template="weblate.service"
|
||||
|
||||
#=================================================
|
||||
# ACTIVATE CELERY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configure celery..."
|
||||
ynh_script_progression --message="Configure celery..." --weight=1
|
||||
|
||||
celeryconf="$final_path/celery-weblate"
|
||||
|
||||
|
@ -234,7 +234,7 @@ chmod -R o-rwx "$final_path"
|
|||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring log rotation..."
|
||||
ynh_script_progression --message="Configuring log rotation..." --weight=1
|
||||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate --non-append
|
||||
|
@ -242,7 +242,7 @@ ynh_use_logrotate --non-append
|
|||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
|
||||
|
||||
yunohost service add "$app" --log "/var/log/$app/weblate.log"
|
||||
yunohost service add "$app-celery" --log "/var/log/$app/weblate-celery-w1.log"
|
||||
|
@ -250,7 +250,7 @@ yunohost service add "$app-celery" --log "/var/log/$app/weblate-celery-w1.log"
|
|||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring permissions..."
|
||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||
|
||||
# Make app public if necessary
|
||||
if [ "$is_public" -eq 1 ]
|
||||
|
@ -269,7 +269,7 @@ ynh_systemd_action --service_name="$app-celery" --action="start"
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name="nginx" --action="reload"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
domain=$(ynh_app_setting_get --app="$app" --key=domain)
|
||||
|
@ -29,14 +29,14 @@ final_path=$(ynh_app_setting_get --app="$app" --key=final_path)
|
|||
# Remove a service from the admin panel, added by `yunohost service add`
|
||||
if yunohost service status "$app" >/dev/null 2>&1
|
||||
then
|
||||
ynh_script_progression --message="Removing $app service integration..."
|
||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
||||
yunohost service remove "$app"
|
||||
fi
|
||||
|
||||
# Remove a service from the admin panel, added by `yunohost service add`
|
||||
if yunohost service status "$app-celery" >/dev/null 2>&1
|
||||
then
|
||||
ynh_script_progression --message="Removing $app-celery service integration..."
|
||||
ynh_script_progression --message="Removing $app-celery service integration..." --weight=1
|
||||
yunohost service remove "$app-celery"
|
||||
fi
|
||||
|
||||
|
@ -51,7 +51,7 @@ ynh_remove_systemd_config --service="$app-celery"
|
|||
#=================================================
|
||||
# REMOVE THE PostgreSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing the PostgreSQL database..."
|
||||
ynh_script_progression --message="Removing the PostgreSQL database..." --weight=1
|
||||
|
||||
# Remove a database if it exists, along with the associated user
|
||||
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
|
@ -75,7 +75,7 @@ ynh_exec_warn_less ynh_remove_app_dependencies
|
|||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing app main directory..."
|
||||
ynh_script_progression --message="Removing app main directory..." --weight=2
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
@ -83,7 +83,7 @@ ynh_secure_remove --file="$final_path"
|
|||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing nginx web server configuration..."
|
||||
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
|
||||
|
||||
# Remove the dedicated nginx config
|
||||
ynh_remove_nginx_config
|
||||
|
@ -91,7 +91,7 @@ ynh_remove_nginx_config
|
|||
#=================================================
|
||||
# REMOVE LOGROTATE CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing logrotate configuration..."
|
||||
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
|
||||
|
||||
# Remove the app-specific logrotate config
|
||||
ynh_remove_logrotate
|
||||
|
@ -109,7 +109,7 @@ ynh_secure_remove --file="/var/run/$app-celery"
|
|||
#=================================================
|
||||
# REMOVE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing the dedicated system user..."
|
||||
ynh_script_progression --message="Removing the dedicated system user..." --weight=1
|
||||
|
||||
# Delete a system user
|
||||
ynh_system_user_delete --username="$app"
|
||||
|
|
|
@ -18,7 +18,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading settings..."
|
||||
ynh_script_progression --message="Loading settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -32,7 +32,7 @@ db_pwd=$(ynh_app_setting_get --app="$app" --key=psqlpwd)
|
|||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..."
|
||||
ynh_script_progression --message="Validating restoration parameters..." --weight=1
|
||||
|
||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
||||
|
@ -50,7 +50,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..."
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=4
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
|
@ -60,7 +60,7 @@ ln -sf "$final_path/local_settings.py" "$final_path/venv/lib/$weblate_pypath/sit
|
|||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the dedicated system user..."
|
||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path" --use_shell
|
||||
|
@ -100,7 +100,7 @@ ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./d
|
|||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the systemd configuration..."
|
||||
ynh_script_progression --message="Restoring the systemd configuration..." --weight=4
|
||||
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
|
@ -110,14 +110,14 @@ systemctl enable "$app-celery" --quiet
|
|||
#=================================================
|
||||
# RESTORE UWSGI
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring uwsgi configurations..."
|
||||
ynh_script_progression --message="Restoring uwsgi configurations..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/uwsgi/apps-available/$app.ini"
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
|
||||
|
||||
yunohost service add "$app" --log "/var/log/$app/weblate.log"
|
||||
yunohost service add "$app-celery" --log "/var/log/$app/weblate-celery-w1.log"
|
||||
|
@ -142,7 +142,7 @@ ynh_systemd_action --service_name="$app-celery" --action="start"
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name="nginx" --action="reload"
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -55,7 +55,7 @@ fi
|
|||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
if [[ -d "$final_path/bin/" ]]
|
||||
then
|
||||
|
@ -84,7 +84,7 @@ ynh_systemd_action --service_name="$app-celery" --action="stop"
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading nginx web server configuration..."
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=3
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
@ -94,14 +94,14 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# Update dependencies
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..."
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=5
|
||||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies"
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username="$app" --home_dir="$final_path" --use_shell
|
||||
|
@ -109,7 +109,7 @@ ynh_system_user_create --username="$app" --home_dir="$final_path" --use_shell
|
|||
#=================================================
|
||||
# CONFIGURE HUB
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configure hub..."
|
||||
ynh_script_progression --message="Configure hub..." --weight=2
|
||||
|
||||
mkdir -p "$final_path/.config/"
|
||||
ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub"
|
||||
|
@ -121,7 +121,7 @@ EOF
|
|||
#=================================================
|
||||
# SPECIFIC SETUP UWSGI
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configure uwsgi..."
|
||||
ynh_script_progression --message="Configure uwsgi..." --weight=2
|
||||
|
||||
finaluwsgiini="/etc/uwsgi/apps-available/$app.ini"
|
||||
|
||||
|
@ -130,14 +130,14 @@ ynh_add_config --template="../conf/uwsgi.ini" --destination="$finaluwsgiini"
|
|||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..."
|
||||
ynh_script_progression --message="Configuring a systemd service..." --weight=3
|
||||
|
||||
ynh_add_systemd_config --service="$app" --template="weblate.service"
|
||||
|
||||
#=================================================
|
||||
# ACTIVATE CELERY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configure celery..."
|
||||
ynh_script_progression --message="Configure celery..." --weight=2
|
||||
|
||||
celeryconf="$final_path/celery-weblate"
|
||||
|
||||
|
@ -181,7 +181,7 @@ upgrade() {
|
|||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Create weblate configuration file..."
|
||||
ynh_script_progression --message="Create weblate configuration file..." --weight=2
|
||||
# save old settings file
|
||||
settings="$final_path/venv/lib/$weblate_pypath/site-packages/weblate/settings.py"
|
||||
path_url="${path_url%/}"
|
||||
|
@ -249,7 +249,7 @@ upgrade $weblate_version "../conf/settings.py"
|
|||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading logrotate configuration..."
|
||||
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
|
||||
|
||||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_use_logrotate --non-append
|
||||
|
@ -257,7 +257,7 @@ ynh_use_logrotate --non-append
|
|||
#=================================================
|
||||
# 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" --log "/var/log/$app/weblate.log"
|
||||
yunohost service add "$app-celery" --log "/var/log/$app/weblate-celery-w1.log"
|
||||
|
@ -288,7 +288,7 @@ ynh_systemd_action --service_name="$app-celery" --action="start"
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
Loading…
Reference in a new issue