mirror of
https://github.com/dathere/ckan-devstaller.git
synced 2025-11-09 13:39:49 +00:00
Add user removal before sysadmin addition
Attempt to remove existing user before adding new sysadmin.
This commit is contained in:
parent
a02565cdd8
commit
bb0c3d36a9
1 changed files with 1 additions and 0 deletions
|
|
@ -258,6 +258,7 @@ fn main() -> Result<()> {
|
|||
let sysadmin_username = config.sysadmin.username;
|
||||
let sysadmin_password = config.sysadmin.password;
|
||||
let sysadmin_email = config.sysadmin.email;
|
||||
cmd!(sh, "ckan -c /etc/ckan/default/ckan.ini user remove {username}").run().ok(); // Try to remove the existing user (use .ok() so it doesn't fail if user doesn't exist)
|
||||
cmd!(sh, "ckan -c /etc/ckan/default/ckan.ini user add {sysadmin_username} password={sysadmin_password} email={sysadmin_email}").run()?;
|
||||
cmd!(
|
||||
sh,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue