1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flohmarkt_ynh.git synced 2024-09-03 18:36:30 +02:00

backup everything

…until there'll be complains.
This commit is contained in:
Chris Vogel 2024-04-22 15:02:30 +02:00
parent 3b5f1155a3
commit 8d90b0d941
3 changed files with 15 additions and 5 deletions

View file

@ -18,8 +18,17 @@ ynh_print_info --message="Stopping flohmarkt and couchdb to backup data..."
yunohost service stop flohmarkt
systemctl stop couchdb
ynh_backup --src_path="$data_dir" --is_big
ynh_backup --src_path="/var/lib/couchdb" --is_big
# since this might be re-installed as a dependency during 'remove' and
# 'install' anew (like after a failed upgrade) we do not want to use
# --is_big even thought the directories might be big because:
# "don't want that your package does backup that part during ynh_backup_before_upgrade"
# https://yunohost.org/en/packaging_apps_scripts_helpers#ynh-backup
#
# if this becomes a pain we'll need to stop deleting this directories on 'remove'
# ynh_backup --src_path="$data_dir" --is_big
# ynh_backup --src_path="/var/lib/couchdb" --is_big
ynh_backup --src_path="$data_dir"
ynh_backup --src_path="/var/lib/couchdb"
ynh_print_info --message="...done. Starting couchdb and flohmarkt."
systemctl start couchdb

View file

@ -76,6 +76,7 @@ python3 -m venv --without-pip "$install_dir/venv"
# JwtSecret
jwtsecret=$(ynh_string_random --length=344 --filter='a-zA-Z0-9/+')
ynh_app_setting_set --app=$app --key=jwtsecret --value="$jwtsecret"
password_couchdb_flohmarkt=$(ynh_string_random --length=31 --filter='A-Za-z0-9_.:,')
ynh_app_setting_set --app=$app --key=password_couchdb_flohmarkt --value="$password_couchdb_flohmarkt"

View file

@ -22,10 +22,10 @@ couchdb couchdb/mode select standalone
couchdb couchdb/mode seen true
couchdb couchdb/bindaddress string 127.0.0.1
couchdb couchdb/bindaddress seen true
couchdb couchdb/cookie string $password
couchdb couchdb/adminpass password $password
couchdb couchdb/cookie string $couchdb_magic_cookie
couchdb couchdb/adminpass password $password_couchdb_admin
couchdb couchdb/adminpass seen true
couchdb couchdb/adminpass_again password $password
couchdb couchdb/adminpass_again password $password_couchdb_admin
couchdb couchdb/adminpass_again seen true" | debconf-set-selections
DEBIAN_FRONTEND=noninteractive # apt-get install -y --force-yes couchdb
ynh_install_extra_app_dependencies \