This commit is contained in:
Slaviša Arežina 2025-08-04 09:15:32 +02:00 committed by GitHub
parent 46728b01fe
commit 1c7a39438c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 26 additions and 16 deletions

View File

@ -27,13 +27,28 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
msg_info "Updating $APP"
systemctl stop pairdrop RELEASE=$(curl -fsSL https://api.github.com/repos/schlagmichdoch/PairDrop/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
cd /opt/pairdrop if [[ ! -f ~/.pairdrop ]] || [[ "${RELEASE}" != "$(cat ~/.pairdrop)" ]]; then
git pull msg_info "Stopping ${APP}"
npm install systemctl stop pairdrop
systemctl start pairdrop msg_ok "Stopped ${APP}"
msg_ok "Updated $APP"
fetch_and_deploy_gh_release "pairdrop" "schlagmichdoch/PairDrop" "tarball"
msg_info "Configuring PairDrop"
cd /opt/pairdrop
$STD npm install
msg_ok "Configured PairDrop"
msg_info "Starting ${APP}"
systemctl start pairdrop
msg_ok "Started ${APP}"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}."
fi
exit exit
} }

View File

@ -6,7 +6,7 @@
], ],
"date_created": "2024-05-02", "date_created": "2024-05-02",
"type": "ct", "type": "ct",
"updateable": false, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 3000, "interface_port": 3000,
"documentation": "https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md", "documentation": "https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md",

View File

@ -13,15 +13,10 @@ setting_up_container
network_check network_check
update_os update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
git
msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs NODE_VERSION="22" setup_nodejs
fetch_and_deploy_gh_release "pairdrop" "schlagmichdoch/PairDrop" "tarball"
msg_info "Installing PairDrop" msg_info "Configuring PairDrop"
git clone -q https://github.com/schlagmichdoch/PairDrop.git /opt/pairdrop
cd /opt/pairdrop cd /opt/pairdrop
$STD npm install $STD npm install
msg_ok "Installed PairDrop" msg_ok "Installed PairDrop"