File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ Commands:
29
29
status check database installation status
30
30
genpass generate DB,API,Symfony,admin password files
31
31
create-db-users create (empty) database and users
32
+ update-password update DB user database to that in 'etc/dbpasswords.secret'
32
33
install create database, example contest and users if not existing
33
34
bare-install create database, setup defaults if not existing
34
35
uninstall remove database users and database, INCLUDING ALL DATA!
@@ -233,6 +234,17 @@ remove_db_users()
233
234
verbose " DOMjudge database and user(s) removed."
234
235
}
235
236
237
+ update_password ()
238
+ {
239
+ read_dbpasswords
240
+ (
241
+ echo " ALTER USER '$domjudge_DBUSER '@'localhost' IDENTIFIED BY '$domjudge_PASSWD ';"
242
+ echo " FLUSH PRIVILEGES;"
243
+ ) | mysql
244
+ verbose " ALTER USER '$domjudge_DBUSER '@'localhost' IDENTIFIED BY '$domjudge_PASSWD ';"
245
+ verbose " Database user password updated from credentials file."
246
+ }
247
+
236
248
install_examples ()
237
249
{
238
250
DBUSER=$domjudge_DBUSER PASSWD=$domjudge_PASSWD symfony_console domjudge:load-example-data
@@ -320,6 +332,10 @@ create-db-users)
320
332
create_db_users
321
333
;;
322
334
335
+ update-password)
336
+ update_password
337
+ ;;
338
+
323
339
bare-install|install)
324
340
read_dbpasswords
325
341
create_db_users
You can’t perform that action at this time.
0 commit comments