1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cryptpad_ynh.git synced 2024-09-03 18:26:14 +02:00
This commit is contained in:
ericgaspar 2022-04-04 14:01:27 +02:00
parent 00d1ba29c0
commit 5162591244
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 33 additions and 7 deletions

View file

@ -63,7 +63,7 @@ echo "Handling asset at $asset_url"
# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) # Here we base the source file name upon a unique keyword in the assets url (admin vs. update)
# Leave $src empty to ignore the asset # Leave $src empty to ignore the asset
case $asset_url in case $asset_url in
*".tar.gz"*) *".tar.gz")
src="app" src="app"
;; ;;
esac esac
@ -117,9 +117,6 @@ done
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
# Install moreutils, needed for sponge
sudo apt-get install moreutils
# Replace new version in manifest # Replace new version in manifest
echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json

View file

@ -45,6 +45,12 @@ ynh_backup --src_path="$final_path"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# SPECIFIC BACKUP # SPECIFIC BACKUP
#================================================= #=================================================

View file

@ -107,7 +107,7 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="server available" ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Serving content"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -130,6 +130,14 @@ pushd "$final_path"
ynh_exec_warn_less bower install --allow-root ynh_exec_warn_less bower install --allow-root
popd popd
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
@ -143,7 +151,7 @@ yunohost service add $app --description="Zero Knowledge realtime collaborative e
ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_script_progression --message="Starting a systemd service..." --weight=2
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="server available" ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="Serving content"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT

View file

@ -84,6 +84,13 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet systemctl enable $app.service --quiet
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
@ -96,7 +103,7 @@ yunohost service add $app --description="Zero Knowledge realtime collaborative e
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="server available" ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Serving content"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -138,6 +138,14 @@ env_path="$PATH"
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================