Skip to content

Commit b685312

Browse files
authored
copyparty: use fetch_and_deploy_gh_release for version tracking (#16624)
1 parent 293e634 commit b685312

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

tools/addon/copyparty.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ LOG_PATH="/var/log/copyparty"
3838
DATA_PATH="/var/lib/copyparty"
3939
SVC_USER="copyparty"
4040
SVC_GROUP="copyparty"
41-
SRC_URL="https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py"
4241
DEFAULT_PORT=3923
4342

4443
# ==============================================================================
@@ -115,11 +114,8 @@ function update() {
115114
fi
116115
msg_ok "Stopped service"
117116

118-
msg_info "Updating ${APP}"
119-
curl -fsSL "$SRC_URL" -o "$BIN_PATH"
120-
chmod +x "$BIN_PATH"
117+
USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "copyparty-sfx.py" "9001/copyparty" "singlefile" "latest" "/usr/local/bin" "copyparty-sfx.py"
121118
chown "$SVC_USER:$SVC_GROUP" "$BIN_PATH"
122-
msg_ok "Updated ${APP}"
123119

124120
msg_info "Starting service"
125121
if [[ "$OS" == "Alpine" ]]; then
@@ -186,11 +182,8 @@ function install() {
186182
chown "$SVC_USER:$SVC_GROUP" "$DATA_PATH"
187183
fi
188184

189-
msg_info "Downloading ${APP}"
190-
curl -fsSL "$SRC_URL" -o "$BIN_PATH"
191-
chmod +x "$BIN_PATH"
185+
USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "copyparty-sfx.py" "9001/copyparty" "singlefile" "latest" "/usr/local/bin" "copyparty-sfx.py"
192186
chown "$SVC_USER:$SVC_GROUP" "$BIN_PATH"
193-
msg_ok "Downloaded to ${BIN_PATH}"
194187

195188
msg_info "Creating configuration"
196189
cat <<EOF >"$CONF_PATH"

0 commit comments

Comments
 (0)