1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gancio_ynh.git synced 2024-09-03 20:36:19 +02:00
This commit is contained in:
Éric Gaspar 2023-10-06 14:25:09 +02:00
parent c493d90707
commit 6cccdf3825
2 changed files with 9 additions and 6 deletions

View file

@ -39,11 +39,14 @@ ynh_add_nginx_config
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
yunohost service add $app --description="Federated shared agenda for local communities" --log="/var/log/$app/$app.log"
# Use logrotate to manage application logfile(s) # Use logrotate to manage application logfile(s)
ynh_use_logrotate ynh_use_logrotate
mkdir -p /var/log/$app
chown $app -R /var/log/$app
yunohost service add $app --description="Federated shared agenda for local communities" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# APP INITIAL CONFIGURATION # APP INITIAL CONFIGURATION
#================================================= #=================================================
@ -55,7 +58,6 @@ ynh_add_config --template="config.json" --destination="$install_dir/config.json"
chmod 400 "$install_dir/config.json" chmod 400 "$install_dir/config.json"
chown $app:$app "$install_dir/config.json" chown $app:$app "$install_dir/config.json"
chown $app:$app "/var/log/$app"
#================================================= #=================================================
# INSTALL YARN AND APP # INSTALL YARN AND APP

View file

@ -18,6 +18,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir" ynh_restore_file --origin_path="$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chown $app:$app "/var/log/$app"
#================================================= #=================================================
# RESTORE THE DATA DIRECTORY # RESTORE THE DATA DIRECTORY
@ -48,10 +49,10 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
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
yunohost service add $app --description="Federated shared agenda for local communities" --log="/var/log/$app/$app.log"
ynh_restore_file --origin_path="/etc/logrotate.d/$app" ynh_restore_file --origin_path="/etc/logrotate.d/$app"
yunohost service add $app --description="Federated shared agenda for local communities" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -67,4 +68,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Restoration completed for $app" --last ynh_script_progression --message="Restoration completed for $app" --last