Move from git pull to tarball
This commit is contained in:
parent
8d872ceeea
commit
6894e1511e
@ -35,15 +35,21 @@ function update_script() {
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
msg_info "Updating $APP to ${RELEASE}"
|
||||
cp /opt/cryptpad/config/config.js /opt/config.js
|
||||
wget -q "https://github.com/cryptpad/cryptpad/archive/refs/tags/${RELEASE}.tar.gz" -O $temp_file
|
||||
tar zxf $temp_file
|
||||
cp -rf cryptpad-$RELEASE/* /opt/cryptpad
|
||||
cd /opt/cryptpad
|
||||
$STD git fetch origin --tags
|
||||
$STD git checkout $RELEASE
|
||||
$STD npm ci
|
||||
$STD npm run install:components
|
||||
$STD npm run build
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to ${RELEASE}"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -f $temp_file
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
msg_info "Starting $APP"
|
||||
systemctl start cryptpad
|
||||
msg_ok "Started $APP"
|
||||
|
@ -33,14 +33,15 @@ $STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
msg_ok "Setup Node.js"
|
||||
|
||||
read -p "Do you want to install OnlyOffice components? (Y/N): " onlyoffice
|
||||
read -p "Install OnlyOffice components instead of CKEditor? (Y/N): " onlyoffice
|
||||
|
||||
msg_info "Setup ${APPLICATION}"
|
||||
temp_file=$(mktemp)
|
||||
RELEASE=$(curl -s https://api.github.com/repos/cryptpad/cryptpad/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
cd /opt
|
||||
$STD git clone https://github.com/cryptpad/cryptpad.git cryptpad
|
||||
cd cryptpad
|
||||
$STD git checkout $RELEASE
|
||||
wget -q "https://github.com/cryptpad/cryptpad/archive/refs/tags/${RELEASE}.tar.gz" -O $temp_file
|
||||
tar zxf $temp_file
|
||||
mv cryptpad-$RELEASE /opt/cryptpad
|
||||
cd /opt/cryptpad
|
||||
$STD npm ci
|
||||
$STD npm run install:components
|
||||
$STD npm run build
|
||||
@ -81,6 +82,7 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f $temp_file
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
Loading…
x
Reference in New Issue
Block a user