diff --git a/install/bundle/Dockerfile b/install/bundle/Dockerfile index 8add775..6032e4b 100644 --- a/install/bundle/Dockerfile +++ b/install/bundle/Dockerfile @@ -16,7 +16,7 @@ fi\n\ service ntp start\n\ service mysql start\n\ service apache2 start\n\ -su local_main_judger -c \"~/judge_client/judge_client start\"\n\ +su local_main_judger -c \"/opt/UOJ-System/judger/judge_client start\"\n\ exec bash\n" >/root/up && chmod +x /root/up ENV LANG=C.UTF-8 TZ=Asia/Shanghai diff --git a/install/bundle/install.sh b/install/bundle/install.sh index fdf3ad5..c52f311 100644 --- a/install/bundle/install.sh +++ b/install/bundle/install.sh @@ -58,7 +58,7 @@ setLAMPConf(){ XSendFile On XSendFilePath /var/uoj_data XSendFilePath /var/www/uoj/app/storage - XSendFilePath /home/local_main_judger/judge_client/uoj_judger/include + XSendFilePath /opt/UOJ-System/judger/uoj_judger/include UOJEOF #Enable modules and make UOJ site conf enabled @@ -106,23 +106,23 @@ setJudgeConf(){ chown -R www-data /var/uoj_data && chgrp -R www-data /var/uoj_data #Compile judge_client and set runtime su local_main_judger <uoj_judger/include/uoj_work_path.h </home/local_main_judger/judge_client/.conf.json </opt/UOJ-System/judger/.conf.json < Doing initial config and start service\n" #Replace password placeholders - sed -i -e "s/_main_judger_password_/$_main_judger_password_/g" -e "s/_judger_socket_password_/$_judger_socket_password_/g" /home/local_main_judger/judge_client/.conf.json + sed -i -e "s/_main_judger_password_/$_main_judger_password_/g" -e "s/_judger_socket_password_/$_judger_socket_password_/g" /opt/UOJ-System/judger/.conf.json sed -i -e "s/salt0/$(genRandStr 32)/g" -e "s/salt1/$(genRandStr 16)/g" -e "s/salt2/$(genRandStr 16)/g" -e "s/salt3/$(genRandStr 16)/g" -e "s/_judger_socket_password_/$_judger_socket_password_/g" /var/www/uoj/app/.config.php #Import judge_client to MySQL database service mysql start @@ -150,7 +150,7 @@ initProgress(){ service ntp restart service mysql restart service apache2 restart - su local_main_judger -c '~/judge_client/judge_client start' + su local_main_judger -c '/opt/UOJ-System/judger/judge_client start' #Touch SetupDone flag file printf "\n\n***Installation complete. Enjoy!***\n" } diff --git a/web/app/controllers/download.php b/web/app/controllers/download.php index 9ddf720..1b1bef4 100644 --- a/web/app/controllers/download.php +++ b/web/app/controllers/download.php @@ -27,7 +27,7 @@ $download_name = "problem_$id.zip"; break; case 'testlib.h': - $file_name = "/home/local_main_judger/judge_client/uoj_judger/include/testlib.h"; + $file_name = "/opt/UOJ-System/judger/uoj_judger/include/testlib.h"; $download_name = "testlib.h"; break; default: diff --git a/web/app/libs/uoj-judger-lib.php b/web/app/libs/uoj-judger-lib.php index 0c29c3c..931a4be 100644 --- a/web/app/libs/uoj-judger-lib.php +++ b/web/app/libs/uoj-judger-lib.php @@ -1,7 +1,7 @@