mirror of
https://github.com/YunoHost-Apps/archivist_ynh.git
synced 2024-09-03 18:15:55 +02:00
Fix
This commit is contained in:
parent
9b37ceba4d
commit
dc19074a9e
2 changed files with 4 additions and 10 deletions
|
@ -19,7 +19,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Loading installation settings..."
|
ynh_print_info --message="Loading installation settings..."
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE APP MAIN DIR
|
# BACKUP THE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up the main app directory..."
|
|
||||||
|
|
||||||
ynh_backup --src_path="$final_path"
|
ynh_backup --src_path="$final_path"
|
||||||
|
|
||||||
|
@ -39,14 +38,12 @@ ynh_backup --src_path="$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP LOGROTATE
|
# BACKUP LOGROTATE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up logrotate configuration..."
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE CRON FILE
|
# BACKUP THE CRON FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up cron file..."
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/cron.d/$app"
|
ynh_backup --src_path="/etc/cron.d/$app"
|
||||||
|
|
||||||
|
@ -54,4 +51,4 @@ ynh_backup --src_path="/etc/cron.d/$app"
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||||
|
|
|
@ -127,7 +127,7 @@ then
|
||||||
while read backup_app
|
while read backup_app
|
||||||
do
|
do
|
||||||
ynh_replace_string --match_string="^ynh_app_backup=$" --replace_string="ynh_app_backup=$backup_app\n&" --target_file="$config_file"
|
ynh_replace_string --match_string="^ynh_app_backup=$" --replace_string="ynh_app_backup=$backup_app\n&" --target_file="$config_file"
|
||||||
done <<< "$(yunohost app list | grep id: | sed 's/.*id: //')"
|
done <<< "$(yunohost app list | grep -q 'id: $app' | sed 's/.*id: //')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Calculate and store the config file checksum into the app settings
|
# Calculate and store the config file checksum into the app settings
|
||||||
|
@ -195,11 +195,10 @@ ynh_print_info --message="$Informations"
|
||||||
|
|
||||||
if [ "$encrypt" = "true" ]
|
if [ "$encrypt" = "true" ]
|
||||||
then
|
then
|
||||||
ynh_print_OFF
|
|
||||||
encrypt_message="Your password for encryption is '$encryption_pwd'
|
encrypt_message="Your password for encryption is '$encryption_pwd'
|
||||||
|
|
||||||
"
|
"
|
||||||
ynh_print_ON
|
|
||||||
else
|
else
|
||||||
encrypt_message=""
|
encrypt_message=""
|
||||||
fi
|
fi
|
||||||
|
@ -207,7 +206,6 @@ fi
|
||||||
# Get main domain and buid the url of the admin panel of the app.
|
# Get main domain and buid the url of the admin panel of the app.
|
||||||
admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app"
|
admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app"
|
||||||
|
|
||||||
ynh_print_OFF
|
|
||||||
echo "${encrypt_message}Archivist is going to run $run_freq.
|
echo "${encrypt_message}Archivist is going to run $run_freq.
|
||||||
If you want to change the frequency, have a look to the file /etc/cron.d/$app.
|
If you want to change the frequency, have a look to the file /etc/cron.d/$app.
|
||||||
$Informations
|
$Informations
|
||||||
|
@ -217,7 +215,6 @@ You can configure this app easily by using the experimental __URL_TAG1__config-p
|
||||||
You can also find some specific actions for this app by using the experimental __URL_TAG1__action feature__URL_TAG2__$admin_panel/actions__URL_TAG3__.
|
You can also find some specific actions for this app by using the experimental __URL_TAG1__action feature__URL_TAG2__$admin_panel/actions__URL_TAG3__.
|
||||||
|
|
||||||
If you're facing an issue or want to improve this app, please open a new issue in this __URL_TAG1__project__URL_TAG2__https://github.com/YunoHost-Apps/archivist_ynh__URL_TAG3__." > mail_to_send
|
If you're facing an issue or want to improve this app, please open a new issue in this __URL_TAG1__project__URL_TAG2__https://github.com/YunoHost-Apps/archivist_ynh__URL_TAG3__." > mail_to_send
|
||||||
ynh_print_ON
|
|
||||||
|
|
||||||
ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type=install
|
ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type=install
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue