Skip to content

Commit 9df8412

Browse files
committed
Install Symfony console in domserver_bindir as dj_console
This makes it easily available to admins.
1 parent 3e404e5 commit 9df8412

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ inplace-install-l:
223223
ln -sf $(CURDIR)/judge/runpipe $(judgehost_bindir)
224224
ln -sf $(CURDIR)/judge/create_cgroups $(judgehost_bindir)
225225
ln -sf $(CURDIR)/sql/dj_setup_database $(domserver_bindir)
226+
ln -sf $(CURDIR)/webapp/bin/console $(domserver_bindir)/dj_console
226227
# Create tmpdir and make tmpdir writable for webserver,
227228
# because judgehost-create-dirs sets wrong permissions:
228229
$(MKDIR_P) $(domserver_tmpdir)

misc-tools/force-passwords.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import subprocess
44

5-
webappdir = '@domserver_webappdir@'
5+
bindir = '@domserver_bindir@'
66
etcdir = '@domserver_etcdir@'
77

88
with open(f'{etcdir}/restapi.secret', 'r') as f:
@@ -14,9 +14,9 @@ with open(f'{etcdir}/restapi.secret', 'r') as f:
1414
if len(tokens) == 4 and tokens[0] == 'default':
1515
user = tokens[2]
1616
password = tokens[3]
17-
subprocess.run([webappdir + '/bin/console', 'domjudge:reset-user-password', user, password])
17+
subprocess.run([bindir + '/dj_console', 'domjudge:reset-user-password', user, password])
1818
break
1919

2020
with open(f'{etcdir}/initial_admin_password.secret', 'r') as f:
2121
password = f.readline().strip()
22-
subprocess.run([webappdir + '/bin/console', 'domjudge:reset-user-password', 'admin', password])
22+
subprocess.run([bindir + '/dj_console', 'domjudge:reset-user-password', 'admin', password])

webapp/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ install-domserver:
6161
for d in bin config migrations public resources src templates tests vendor; do \
6262
$(call install_tree,$(DESTDIR)$(domserver_webappdir),$$d) ; \
6363
done
64+
# Add Symlink to Symfony console that is in the standard path
65+
ln -s $(domserver_webappdir)/bin/console $(DESTDIR)$(domserver_bindir)/dj_console
6466
# Change webapp/public/doc symlink
6567
ln -sf $(domjudge_docdir) $(DESTDIR)$(domserver_webappdir)/public/doc
6668
$(INSTALL_DATA) -t $(DESTDIR)$(domserver_webappdir) phpunit.xml.dist .env

0 commit comments

Comments
 (0)