1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vaultwarden_ynh.git synced 2024-09-03 18:26:31 +02:00

Merge pull request #208 from YunoHost-Apps/bitwarden

Bitwarden
This commit is contained in:
yalh76 2022-08-31 01:55:22 +02:00 committed by GitHub
commit 9315713ba6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -119,6 +119,7 @@ if [ -z $datadir ]; then
mkdir -p $datadir mkdir -p $datadir
rsync -arz "$final_path/live/data/" "$datadir/" --delete-after --remove-source-files rsync -arz "$final_path/live/data/" "$datadir/" --delete-after --remove-source-files
ynh_secure_remove --file="$final_path/live/data" ynh_secure_remove --file="$final_path/live/data"
ynh_system_user_create --username=$app --home_dir="$final_path"
chmod 750 "$datadir" chmod 750 "$datadir"
chmod -R o-rwx "$datadir" chmod -R o-rwx "$datadir"
chown -R $app:$app "$datadir" chown -R $app:$app "$datadir"

View file

@ -198,8 +198,7 @@ ynh_handle_app_migration () {
old_db_name=$(ynh_app_setting_get --app=$old_app --key=db_name) old_db_name=$(ynh_app_setting_get --app=$old_app --key=db_name)
# Check if a database exists before trying to move it # Check if a database exists before trying to move it
local mysql_root_password=$(cat $MYSQL_ROOT_PWD_FILE) if [ -n "$old_db_name" ] && mysqlshow | grep -q "^| $old_db_name"
if [ -n "$old_db_name" ] && mysqlshow -u root -p$mysql_root_password | grep -q "^| $old_db_name"
then then
old_db_user=$old_db_name old_db_user=$old_db_name
db_pwd=$(ynh_app_setting_get --app=$old_app --key=mysqlpwd) db_pwd=$(ynh_app_setting_get --app=$old_app --key=mysqlpwd)