change password if user already exists
This commit is contained in:
parent
6de91c0c4e
commit
2da2a57e13
5
debian/openwebrx.postinst
vendored
5
debian/openwebrx.postinst
vendored
@ -25,8 +25,13 @@ case "$1" in
|
||||
|
||||
db_get openwebrx/admin_user_password
|
||||
if [ ! -z "${RET}" ]; then
|
||||
if ! openwebrx-admin --silent hasuser admin; then
|
||||
# create initial openwebrx user
|
||||
OWRX_PASSWORD="${RET}" openwebrx admin --noninteractive adduser admin
|
||||
else
|
||||
# change existing user's password
|
||||
OWRX_PASSWORD="${RET}" openwebrx admin --noninteractive resetpassword admin
|
||||
fi
|
||||
fi
|
||||
# remove password from debconf database
|
||||
db_unregister openwebrx/admin_user_password
|
||||
|
Loading…
Reference in New Issue
Block a user