File tree 1 file changed +16
-0
lines changed
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!
@@ -235,6 +236,17 @@ remove_db_users()
235
236
verbose " DOMjudge database and user(s) removed."
236
237
}
237
238
239
+ update_password ()
240
+ {
241
+ read_dbpasswords
242
+ (
243
+ echo " ALTER USER '$domjudge_DBUSER '@'localhost' IDENTIFIED BY '$domjudge_PASSWD ';"
244
+ echo " FLUSH PRIVILEGES;"
245
+ ) | mysql
246
+ verbose " ALTER USER '$domjudge_DBUSER '@'localhost' IDENTIFIED BY '$domjudge_PASSWD ';"
247
+ verbose " Database user password updated from credentials file."
248
+ }
249
+
238
250
install_examples ()
239
251
{
240
252
DBUSER=$domjudge_DBUSER PASSWD=$domjudge_PASSWD symfony_console domjudge:load-example-data
@@ -337,6 +349,10 @@ create-db-users)
337
349
create_db_users_helper
338
350
;;
339
351
352
+ update-password)
353
+ update_password
354
+ ;;
355
+
340
356
bare-install|install)
341
357
read_dbpasswords
342
358
create_db_users
You can’t perform that action at this time.
0 commit comments