1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/archivebox_ynh.git synced 2024-09-03 18:15:54 +02:00

Merge pull request #4 from YunoHost-Apps/fix-restore

Fix restore script by creating /var/log/$app folder
This commit is contained in:
Max Fowler 2021-08-24 13:22:16 +02:00 committed by GitHub
commit 5da7feeb3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 11 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
A self-hosted internet archiving solution to collect, save, and view sites you want to preserve offline. A self-hosted internet archiving solution to collect, save, and view sites you want to preserve offline.
**Shipped version:** 1.4~ynh1 **Shipped version:** 1.5~ynh1
**Demo:** https://archiveboxdemo.commoninternet.net **Demo:** https://archiveboxdemo.commoninternet.net

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
**Version incluse :** 1.4~ynh1 **Version incluse :** 1.5~ynh1
**Démo :** https://archiveboxdemo.commoninternet.net **Démo :** https://archiveboxdemo.commoninternet.net

View file

@ -6,7 +6,7 @@
"en": "A self-hosted internet archiving solution to collect, save, and view sites you want to preserve offline.", "en": "A self-hosted internet archiving solution to collect, save, and view sites you want to preserve offline.",
"fr": "" "fr": ""
}, },
"version": "1.4~ynh1", "version": "1.5~ynh1",
"url": "https://archivebox.io/", "url": "https://archivebox.io/",
"upstream": { "upstream": {
"license": "MIT", "license": "MIT",

View file

@ -102,6 +102,14 @@ 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
mkdir -p /var/log/$app
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
@ -112,17 +120,12 @@ yunohost service add $app --description="Self-hosted internet archiving" --log="
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Ensuring systemd log folder is restored..." --weight=1
mkdir -p /var/log/$app
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="/var/log/$app/$app.log" ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================