set gitlab_user default value in postrm
This commit is contained in:
parent
374c768315
commit
d9a8b7a138
1 changed files with 2 additions and 0 deletions
2
debian/postrm
vendored
2
debian/postrm
vendored
|
@ -53,6 +53,8 @@ case "$1" in
|
||||||
rm -rf ${gitlab_log_dir}
|
rm -rf ${gitlab_log_dir}
|
||||||
rm -rf ${gitlab_cache_path}
|
rm -rf ${gitlab_cache_path}
|
||||||
rm -rf ${gitlab_pid_path}
|
rm -rf ${gitlab_pid_path}
|
||||||
|
# Don't fail if user is already removed
|
||||||
|
gitlab_user=${gitlab_user:-gitlab}
|
||||||
id -u ${gitlab_user} && userdel -r ${gitlab_user}
|
id -u ${gitlab_user} && userdel -r ${gitlab_user}
|
||||||
rm -rf ${gitlab_data_dir}
|
rm -rf ${gitlab_data_dir}
|
||||||
su ${gitlab_user} -c 'psql gitlab_production -c ""' && su postgres -c "dropdb gitlab_production"
|
su ${gitlab_user} -c 'psql gitlab_production -c ""' && su postgres -c "dropdb gitlab_production"
|
||||||
|
|
Loading…
Add table
Reference in a new issue