mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update install.sh
This commit is contained in:
parent
568858efe8
commit
a16dc0e377
@ -1648,7 +1648,7 @@ create_admin_and_show_logins_success_message() {
|
|||||||
display_admin_status_and_logins
|
display_admin_status_and_logins
|
||||||
else
|
else
|
||||||
echo "WARNING: Admin user $new_username was not created using opencli. Trying to insert user manually to SQLite database.."
|
echo "WARNING: Admin user $new_username was not created using opencli. Trying to insert user manually to SQLite database.."
|
||||||
password_hash=$(python3 /usr/local/admin/core/users/hash $new_password)
|
password_hash=$(/usr/local/admin/venv/bin/python3 /usr/local/admin/core/users/hash $new_password)
|
||||||
create_table_sql="CREATE TABLE IF NOT EXISTS user (id INTEGER PRIMARY KEY, username TEXT UNIQUE NOT NULL, password_hash TEXT NOT NULL, role TEXT NOT NULL DEFAULT 'user', is_active BOOLEAN DEFAULT 1 NOT NULL);"
|
create_table_sql="CREATE TABLE IF NOT EXISTS user (id INTEGER PRIMARY KEY, username TEXT UNIQUE NOT NULL, password_hash TEXT NOT NULL, role TEXT NOT NULL DEFAULT 'user', is_active BOOLEAN DEFAULT 1 NOT NULL);"
|
||||||
insert_user_sql="INSERT INTO user (username, password_hash) VALUES ('$new_username', '$password_hash');"
|
insert_user_sql="INSERT INTO user (username, password_hash) VALUES ('$new_username', '$password_hash');"
|
||||||
output=$(sqlite3 "$db_file_path" "$create_table_sql" "$insert_user_sql" 2>&1)
|
output=$(sqlite3 "$db_file_path" "$create_table_sql" "$insert_user_sql" 2>&1)
|
||||||
|
Loading…
Reference in New Issue
Block a user