Refactor Verdaccio install and update scripts
Updated both install and update scripts to use the setup_nodejs function with NODE_MODULE for Verdaccio installation and upgrade. Improved update process to include apt update/upgrade steps, and standardized apt cleanup commands in the install script.
This commit is contained in:
parent
49ca9926cc
commit
7190be8af0
@ -27,10 +27,13 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
NODE_VERSION="22" setup_nodejs
|
|
||||||
|
msg_info "Updating LXC Container"
|
||||||
msg_info "Updating ${APP} LXC"
|
$STD apt update
|
||||||
$STD npm update -g verdaccio
|
$STD apt -y upgrade
|
||||||
|
msg_ok "Updated LXC Container"
|
||||||
|
|
||||||
|
NODE_VERSION="22" NODE_MODULE="verdaccio" setup_nodejs
|
||||||
systemctl restart verdaccio
|
systemctl restart verdaccio
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
exit
|
exit
|
||||||
@ -43,4 +46,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:4873${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:4873${CL}"
|
||||||
|
@ -19,11 +19,7 @@ $STD apt-get install -y \
|
|||||||
build-essential
|
build-essential
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="22" NODE_MODULE="verdaccio" setup_nodejs
|
||||||
|
|
||||||
msg_info "Installing Verdaccio"
|
|
||||||
$STD npm install --global verdaccio
|
|
||||||
msg_ok "Installed Verdaccio"
|
|
||||||
|
|
||||||
msg_info "Configuring Verdaccio"
|
msg_info "Configuring Verdaccio"
|
||||||
mkdir -p /opt/verdaccio/config
|
mkdir -p /opt/verdaccio/config
|
||||||
@ -94,6 +90,7 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
$STD apt-get -y autoremove
|
$STD apt -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt -y autoclean
|
||||||
msg_ok "Cleaned"
|
$STD apt -y clean
|
||||||
|
msg_ok "Cleaned"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user