mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Delete the local user after migrate libraries, minor review change
This commit is contained in:
parent
f86b6b6ee1
commit
a8c41eb09c
3 changed files with 4 additions and 2 deletions
|
@ -14,7 +14,7 @@
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "User account to be migrate from the old to the new behavior"
|
"en": "User account to be migrate from the old to the new behavior"
|
||||||
},
|
},
|
||||||
"example": "bob@ynh.local"
|
"example": "bob@domain.tld"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -172,7 +172,7 @@ sleep 5
|
||||||
su - $seafile_user -s /bin/bash -c "$final_path/seafile-server-$seafile_version/seafile.sh start"
|
su - $seafile_user -s /bin/bash -c "$final_path/seafile-server-$seafile_version/seafile.sh start"
|
||||||
# We escape all char witch needed.
|
# We escape all char witch needed.
|
||||||
ynh_replace_special_string --match_string __ADMIN_PASSWORD__ --replace_string "$admin_password" --target_file $final_path/first_launch.exp
|
ynh_replace_special_string --match_string __ADMIN_PASSWORD__ --replace_string "$admin_password" --target_file $final_path/first_launch.exp
|
||||||
admin_email=$(ynh_user_get_info $admin 'mail')
|
admin_email=$(ynh_user_get_info --username $admin --key 'mail')
|
||||||
su - $seafile_user -s /bin/bash -c "$final_path/first_launch.exp $final_path/seafile-server-$seafile_version $admin_email"
|
su - $seafile_user -s /bin/bash -c "$final_path/first_launch.exp $final_path/seafile-server-$seafile_version $admin_email"
|
||||||
ynh_secure_remove --file="$final_path/first_launch.exp"
|
ynh_secure_remove --file="$final_path/first_launch.exp"
|
||||||
|
|
||||||
|
|
|
@ -27,3 +27,5 @@ source_repositories = seafile_api.get_owned_repo_list(source_user_email);
|
||||||
|
|
||||||
for repo in source_repositories:
|
for repo in source_repositories:
|
||||||
seafile_api.set_repo_owner(repo.id, target_user_email)
|
seafile_api.set_repo_owner(repo.id, target_user_email)
|
||||||
|
|
||||||
|
ccnet_api.remove_emailuser('DB', source_user_email)
|
||||||
|
|
Loading…
Reference in a new issue