From 715a000af2c658f2fd3a33e717363711750f5bfe Mon Sep 17 00:00:00 2001 From: Kevin Brubeck Unhammer Date: Thu, 15 Aug 2024 14:36:58 +0200 Subject: [PATCH] =?UTF-8?q?servlet.py=20=E2=86=92=20apy.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- MANIFEST.in | 2 +- tests/test.py | 2 +- tools/systemd/apy.service | 2 +- tools/sysvinit/apy.sh | 2 +- tools/upstart/apertium-apy.conf | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 508648dd2..d65e89be6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,5 +44,5 @@ RUN cd apertium-apy && make -j4 # Run APy EXPOSE 2737 -ENTRYPOINT ["python3", "/root/apertium-apy/servlet.py", "--lang-names", "/root/apertium-apy/langNames.db"] +ENTRYPOINT ["python3", "/root/apertium-apy/apy.py", "--lang-names", "/root/apertium-apy/langNames.db"] CMD ["/usr/share/apertium/modes", "--port", "2737"] diff --git a/MANIFEST.in b/MANIFEST.in index df607788f..788913ba5 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include COPYING include langNames.db -include servlet.py +include apy.py include language_names/* recursive-include tools * diff --git a/tests/test.py b/tests/test.py index 575e6dd1d..8073a0007 100755 --- a/tests/test.py +++ b/tests/test.py @@ -50,7 +50,7 @@ def setUpModule(): # noqa: N802 for _ in range(3): time.sleep(1) print('.') - server_handle = subprocess.Popen(coverage_cli_args + [os.path.join(base_path, 'servlet.py')] + cli_args) # TODO: print only on error? + server_handle = subprocess.Popen(coverage_cli_args + [os.path.join(base_path, 'apy.py')] + cli_args) # TODO: print only on error? started = False waited = 0 diff --git a/tools/systemd/apy.service b/tools/systemd/apy.service index 0d3114dc3..34ec89a41 100644 --- a/tools/systemd/apy.service +++ b/tools/systemd/apy.service @@ -7,7 +7,7 @@ After=network.target # Change this to your username and edit to how you start apy: User=apertium WorkingDirectory=/usr/share/apertium-apy -ExecStart=/usr/bin/python3 servlet.py /usr/share/apertium/modes +ExecStart=/usr/bin/python3 apy.py /usr/share/apertium/modes # Increase the ulimit -n from the default 1024 – you may get the error # "Too many open files" with a lot of pipelines open. diff --git a/tools/sysvinit/apy.sh b/tools/sysvinit/apy.sh index 89c636202..6beb633c5 100755 --- a/tools/sysvinit/apy.sh +++ b/tools/sysvinit/apy.sh @@ -20,7 +20,7 @@ export PKG_CONFIG_PATH=/traductors/lib/pkgconfig export PATH=/traductors/bin:/usr/bin:/bin:$PATH export LD_LIBRARY_PATH=/traductors/lib:$LD_LIBRARY_PATH -SERVLET="servlet.py" +SERVLET="apy.py" EXEC="/traductors/apertium-apy/" ARGS="-l tools/apertiumlangs.db ../pairs -d -P /var/log" USER="www-data" diff --git a/tools/upstart/apertium-apy.conf b/tools/upstart/apertium-apy.conf index 47b749c7b..7aec9c5bc 100644 --- a/tools/upstart/apertium-apy.conf +++ b/tools/upstart/apertium-apy.conf @@ -9,7 +9,7 @@ env CONFIG=/etc/default/apertium script . $CONFIG - python3 $APYPATH/servlet.py $APERTIUMPATH + python3 $APYPATH/apy.py $APERTIUMPATH end script pre-start script