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

Fix frequencies settings during upgrade

This commit is contained in:
Salamandar 2024-03-29 13:36:54 +01:00
parent 0eae2e1c69
commit 663507805a
2 changed files with 11 additions and 0 deletions

View file

@ -38,6 +38,16 @@ _set_frequencies() {
ynh_app_setting_set --app="$app" --key=frequency_human --value="$frequency_human"
}
_fix_frequencies() {
case "$frequency" in
Daily) frequency="daily" ; ynh_app_setting_set --app="$app" --key="frequency" --value="$frequency" ;;
"Each 3 days") frequency="days_3" ; ynh_app_setting_set --app="$app" --key="frequency" --value="$frequency" ;;
"Weekly") frequency="weekly" ; ynh_app_setting_set --app="$app" --key="frequency" --value="$frequency" ;;
"Biweekly") frequency="weeks_2" ; ynh_app_setting_set --app="$app" --key="frequency" --value="$frequency" ;;
"Monthly") frequency="monthly" ; ynh_app_setting_set --app="$app" --key="frequency" --value="$frequency" ;;
esac
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -12,6 +12,7 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..."
_fix_frequencies
_set_frequencies
# If encrypt doesn't exist, create it