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:
parent
0eae2e1c69
commit
663507805a
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue