mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
try fix migration
This commit is contained in:
parent
f263e9df46
commit
0f9f95802a
1 changed files with 8 additions and 1 deletions
|
@ -76,9 +76,16 @@ fi
|
||||||
ynh_handle_app_migration --migration_id=garradin --migration_list=garradin_migrations
|
ynh_handle_app_migration --migration_id=garradin --migration_list=garradin_migrations
|
||||||
|
|
||||||
if [[ $migration_process -eq 1 ]]; then
|
if [[ $migration_process -eq 1 ]]; then
|
||||||
|
final_path="/var/www/$app"
|
||||||
|
|
||||||
# Replace the user
|
# Replace the user
|
||||||
ynh_system_user_delete --username="$old_app" --home_dir="$final_path"
|
ynh_system_user_delete $old_app
|
||||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
|
# Ensuring the user has the right home dir
|
||||||
|
if [ ~$app != "$final_path" ]; then
|
||||||
|
usermod -d "$final_path" $app
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue