From 0e6fdb854f83b3343e0d60eb38009149d711fe11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Wed, 8 Mar 2023 13:17:47 +0900 Subject: [PATCH 1/3] add systemd config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- etc/archive-box.service | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 etc/archive-box.service diff --git a/etc/archive-box.service b/etc/archive-box.service new file mode 100644 index 00000000..c131f539 --- /dev/null +++ b/etc/archive-box.service @@ -0,0 +1,28 @@ +# +# These are just a few examples of settings +# +# Items that probably need to be rewritten depending on the environment: +# WorkingDirectory, ExecStart, User, Group, +# + +[Unit] +Description=Open source self-hosted web archiving +Documentation=https://github.com/ArchiveBox/ArchiveBox/wiki + +[Service] +Type=simple +WorkingDirectory=/home/archive-box/archive-box/ +ExecStart=/usr/local/bin/archivebox server 0.0.0.0:8000 +ExecReload=/bin/kill -s HUP $MAINPID +ExecStop=/bin/kill -s QUIT $MAINPID +Restart=always +RestartSec=2 +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=archive-box +User=archive-box +Group=archive-box + + +[Install] +WantedBy=multi-user.target \ No newline at end of file From 67e9c77ab7a58ebdbc170c531bd6a6a420192286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Thu, 9 Mar 2023 14:56:53 +0900 Subject: [PATCH 2/3] remove dash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- etc/{archive-box.service => archivebox.service} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename etc/{archive-box.service => archivebox.service} (83%) diff --git a/etc/archive-box.service b/etc/archivebox.service similarity index 83% rename from etc/archive-box.service rename to etc/archivebox.service index c131f539..b732c6ab 100644 --- a/etc/archive-box.service +++ b/etc/archivebox.service @@ -11,7 +11,7 @@ Documentation=https://github.com/ArchiveBox/ArchiveBox/wiki [Service] Type=simple -WorkingDirectory=/home/archive-box/archive-box/ +WorkingDirectory=/home/archivebox/archivebox/ ExecStart=/usr/local/bin/archivebox server 0.0.0.0:8000 ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID @@ -19,9 +19,9 @@ Restart=always RestartSec=2 StandardOutput=syslog StandardError=syslog -SyslogIdentifier=archive-box -User=archive-box -Group=archive-box +SyslogIdentifier=archivebox +User=archivebox +Group=archivebox [Install] From a580e4627deff327f5648a8de5ed5d1236751704 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Wed, 8 Mar 2023 23:30:30 -0800 Subject: [PATCH 3/3] add instructions on how to install to comment --- etc/archivebox.service | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/etc/archivebox.service b/etc/archivebox.service index b732c6ab..cd42f851 100644 --- a/etc/archivebox.service +++ b/etc/archivebox.service @@ -1,9 +1,10 @@ +# This is an example systemd service config definition for ArchiveBox. # -# These are just a few examples of settings -# -# Items that probably need to be rewritten depending on the environment: -# WorkingDirectory, ExecStart, User, Group, +# Link it into place on your system to use systemd to auto-start the ArchiveBox server on boot: +# https://unix.stackexchange.com/questions/224992/where-do-i-put-my-systemd-unit-file # +# Review and change these lines as-needed for your specific environment and needs: +# WorkingDirectory, ExecStart, User, Group [Unit] Description=Open source self-hosted web archiving @@ -25,4 +26,4 @@ Group=archivebox [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target