Skip to content

Commit 37403b5

Browse files
authored
Add Chromium and Node modules to ArchiveBox scripts (#8725)
1 parent 034c55b commit 37403b5

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

ct/archivebox.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,18 @@ function update_script() {
2828
exit
2929
fi
3030

31-
NODE_VERSION="22" setup_nodejs
31+
NODE_VERSION="22" NODE_MODULE="@postlight/parser@latest,single-file-cli@latest" setup_nodejs
3232
PYTHON_VERSION="3.13" setup_uv
3333

34-
msg_info "Stopping ArchiveBox"
34+
if ! dpkg -l | grep -q "^ii chromium "; then
35+
msg_info "Installing System Dependencies"
36+
$STD apt-get install -y chromium
37+
msg_ok "Installed System Dependencies"
38+
fi
39+
40+
msg_info "Stopping Service"
3541
systemctl stop archivebox
36-
msg_ok "Stopped ArchiveBox"
42+
msg_ok "Stopped Service"
3743

3844
msg_info "Upgrading Playwright"
3945
$STD uv pip install playwright --system
@@ -46,11 +52,10 @@ function update_script() {
4652
sudo -u archivebox archivebox init
4753
msg_ok "Updated ArchiveBox"
4854

49-
msg_info "Starting ArchiveBox"
55+
msg_info "Starting Service"
5056
systemctl start archivebox
51-
msg_ok "Started ArchiveBox"
52-
53-
msg_ok "Updated Successfully"
57+
msg_ok "Started Service"
58+
msg_ok "Updated Successfully!"
5459
exit
5560
}
5661

install/archivebox-install.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ $STD apt-get install -y \
2222
libsasl2-dev \
2323
procps \
2424
dnsutils \
25-
ripgrep
25+
ripgrep \
26+
chromium
2627
msg_ok "Installed Dependencies"
2728

2829
msg_info "Installing Python Dependencies"
@@ -32,15 +33,15 @@ $STD apt-get install -y \
3233
python3-regex
3334
msg_ok "Installed Python Dependencies"
3435

35-
NODE_VERSION="22" setup_nodejs
36+
NODE_VERSION="22" NODE_MODULE="@postlight/parser@latest,single-file-cli@latest" setup_nodejs
3637
PYTHON_VERSION="3.13" setup_uv
3738

3839
msg_info "Installing Playwright"
3940
$STD uv pip install playwright --system
4041
$STD playwright install-deps chromium
4142
msg_ok "Installed Playwright"
4243

43-
msg_info "Installing Chromium and ArchiveBox"
44+
msg_info "Installing ArchiveBox"
4445
mkdir -p /opt/archivebox/{data,.npm,.cache,.local}
4546
$STD adduser --system --shell /bin/bash --gecos 'Archive Box User' --group --disabled-password --home /home/archivebox archivebox
4647
chown -R archivebox:archivebox /opt/archivebox/{data,.npm,.cache,.local}
@@ -92,6 +93,7 @@ motd_ssh
9293
customize
9394

9495
msg_info "Cleaning up"
95-
$STD apt-get -y autoremove
96-
$STD apt-get -y autoclean
96+
$STD apt -y autoremove
97+
$STD apt -y autoclean
98+
$STD apt -y clean
9799
msg_ok "Cleaned"

0 commit comments

Comments
 (0)