Refactor (#6528)
This commit is contained in:
parent
46728b01fe
commit
1c7a39438c
@ -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"
|
|
||||||
|
RELEASE=$(curl -fsSL https://api.github.com/repos/schlagmichdoch/PairDrop/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
if [[ ! -f ~/.pairdrop ]] || [[ "${RELEASE}" != "$(cat ~/.pairdrop)" ]]; then
|
||||||
|
msg_info "Stopping ${APP}"
|
||||||
systemctl stop pairdrop
|
systemctl stop pairdrop
|
||||||
|
msg_ok "Stopped ${APP}"
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "pairdrop" "schlagmichdoch/PairDrop" "tarball"
|
||||||
|
|
||||||
|
msg_info "Configuring PairDrop"
|
||||||
cd /opt/pairdrop
|
cd /opt/pairdrop
|
||||||
git pull
|
$STD npm install
|
||||||
npm install
|
msg_ok "Configured PairDrop"
|
||||||
|
|
||||||
|
msg_info "Starting ${APP}"
|
||||||
systemctl start pairdrop
|
systemctl start pairdrop
|
||||||
msg_ok "Updated $APP"
|
msg_ok "Started ${APP}"
|
||||||
|
|
||||||
|
msg_ok "Updated Successfully"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at ${RELEASE}."
|
||||||
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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",
|
||||||
|
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user