Refactor web-check installation script
This commit is contained in:
parent
b64906dee9
commit
31515a4297
@ -64,13 +64,10 @@ msg_info "Setting up Chromium"
|
|||||||
chmod 755 /usr/bin/chromium
|
chmod 755 /usr/bin/chromium
|
||||||
msg_ok "Setup Chromium"
|
msg_ok "Setup Chromium"
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "web-check" "Lissy93/web-check"
|
||||||
|
|
||||||
msg_info "Installing Web-Check (Patience)"
|
msg_info "Installing Web-Check (Patience)"
|
||||||
temp_file=$(mktemp)
|
cd /opt/web-check
|
||||||
RELEASE="patch-1"
|
|
||||||
curl -fsSL "https://github.com/CrazyWolf13/web-check/archive/refs/heads/${RELEASE}.tar.gz" -o "$temp_file"
|
|
||||||
tar xzf "$temp_file"
|
|
||||||
mv web-check-${RELEASE} /opt/web-check
|
|
||||||
cd /opt/web-check || exit
|
|
||||||
cat <<'EOF' >/opt/web-check/.env
|
cat <<'EOF' >/opt/web-check/.env
|
||||||
CHROME_PATH=/usr/bin/chromium
|
CHROME_PATH=/usr/bin/chromium
|
||||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
||||||
@ -94,11 +91,11 @@ REACT_APP_API_ENDPOINT='/api'
|
|||||||
ENABLE_ANALYTICS='false'
|
ENABLE_ANALYTICS='false'
|
||||||
EOF
|
EOF
|
||||||
$STD yarn install --frozen-lockfile --network-timeout 100000
|
$STD yarn install --frozen-lockfile --network-timeout 100000
|
||||||
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
|
|
||||||
msg_ok "Installed Web-Check"
|
msg_ok "Installed Web-Check"
|
||||||
|
|
||||||
msg_info "Building Web-Check"
|
msg_info "Building Web-Check"
|
||||||
$STD yarn build --production
|
$STD yarn build --production
|
||||||
|
rm -rf /var/lib/apt/lists/* /app/node_modules/.cache
|
||||||
msg_ok "Built Web-Check"
|
msg_ok "Built Web-Check"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
@ -141,13 +138,4 @@ msg_ok "Created Service"
|
|||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
cleanup_lxc
|
||||||
msg_info "Cleaning up"
|
|
||||||
rm -rf "$temp_file"
|
|
||||||
rm -rf /var/lib/apt/lists/* /app/node_modules/.cache
|
|
||||||
$STD apt -y autoremove
|
|
||||||
$STD apt -y autoclean
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user