mirror of
https://framagit.org/YunoHost-Apps/gitea_ynh.git
synced 2024-11-22 11:01:37 +01:00
Reload variable before create user
This commit is contained in:
parent
e5906e7ab4
commit
f1da593278
@ -43,11 +43,6 @@ systemctl stop "$app".service
|
|||||||
ynh_handle_app_migration gogs gogs_migrations
|
ynh_handle_app_migration gogs gogs_migrations
|
||||||
|
|
||||||
if [[ $migration_process -eq 1 ]]; then
|
if [[ $migration_process -eq 1 ]]; then
|
||||||
# Replace the user
|
|
||||||
ynh_system_user_delete $old_app
|
|
||||||
test getent passwd "$app" &>/dev/null || \
|
|
||||||
useradd -d "$DATADIR" --system --user-group "$app" --shell /bin/bash || \
|
|
||||||
ynh_die "Unable to create $app system account"
|
|
||||||
|
|
||||||
# Reload variables
|
# Reload variables
|
||||||
dbname=$app
|
dbname=$app
|
||||||
@ -57,6 +52,12 @@ if [[ $migration_process -eq 1 ]]; then
|
|||||||
REPO_PATH="$DATADIR/repositories"
|
REPO_PATH="$DATADIR/repositories"
|
||||||
DATA_PATH="$DATADIR/data"
|
DATA_PATH="$DATADIR/data"
|
||||||
|
|
||||||
|
# Replace the user
|
||||||
|
ynh_system_user_delete $old_app
|
||||||
|
test getent passwd "$app" &>/dev/null || \
|
||||||
|
useradd -d "$DATADIR" --system --user-group "$app" --shell /bin/bash || \
|
||||||
|
ynh_die "Unable to create $app system account"
|
||||||
|
|
||||||
# Clean old binary
|
# Clean old binary
|
||||||
ynh_secure_remove $final_path/gogs
|
ynh_secure_remove $final_path/gogs
|
||||||
ynh_secure_remove $final_path/custom/conf/auth.d
|
ynh_secure_remove $final_path/custom/conf/auth.d
|
||||||
|
Loading…
Reference in New Issue
Block a user