Refactor (#6832)
This commit is contained in:
parent
0c23782485
commit
82d1a872c7
@ -28,21 +28,20 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Updating yt-dlp"
|
|
||||||
$STD yt-dlp -U
|
|
||||||
msg_ok "Updated yt-dlp"
|
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/marcopiovanello/yt-dlp-web-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/marcopiovanello/yt-dlp-web-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
if [[ "${RELEASE}" != "$(cat /opt/yt-dlp-webui_version.txt)" ]] || [[ ! -f /opt/yt-dlp-webui_version.txt ]]; then
|
if [[ "${RELEASE}" != "$(cat ~/.yt-dlp-webui)" ]] || [[ ! -f ~/.yt-dlp-webui ]]; then
|
||||||
|
|
||||||
msg_info "Stopping $APP"
|
msg_info "Stopping $APP"
|
||||||
systemctl stop yt-dlp-webui
|
systemctl stop yt-dlp-webui
|
||||||
msg_ok "Stopped $APP"
|
msg_ok "Stopped $APP"
|
||||||
|
|
||||||
msg_info "Updating $APP to v${RELEASE}"
|
msg_info "Updating yt-dlp"
|
||||||
|
$STD yt-dlp -U
|
||||||
|
msg_ok "Updated yt-dlp"
|
||||||
|
|
||||||
rm -rf /usr/local/bin/yt-dlp-webui
|
rm -rf /usr/local/bin/yt-dlp-webui
|
||||||
curl -fsSL "https://github.com/marcopiovanello/yt-dlp-web-ui/releases/download/v${RELEASE}/yt-dlp-webui_linux-amd64" -o "/usr/local/bin/yt-dlp-webui"
|
fetch_and_deploy_gh_release "yt-dlp-webui" "marcopiovanello/yt-dlp-web-ui" "singlefile" "latest" "/usr/local/bin" "yt-dlp-webui_linux-amd64"
|
||||||
chmod +x /usr/local/bin/yt-dlp-webui
|
|
||||||
msg_ok "Updated $APP LXC"
|
|
||||||
|
|
||||||
msg_info "Starting $APP"
|
msg_info "Starting $APP"
|
||||||
systemctl start yt-dlp-webui
|
systemctl start yt-dlp-webui
|
||||||
@ -60,4 +59,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}:3033${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3033${CL}"
|
||||||
|
@ -17,17 +17,8 @@ msg_info "Installing Dependencies"
|
|||||||
$STD apt-get install -y ffmpeg
|
$STD apt-get install -y ffmpeg
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing ${APPLICATION}"
|
fetch_and_deploy_gh_release "yt-dlp-webui" "marcopiovanello/yt-dlp-web-ui" "singlefile" "latest" "/usr/local/bin" "yt-dlp-webui_linux-amd64"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/marcopiovanello/yt-dlp-web-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "yt-dlp"
|
||||||
curl -fsSL "https://github.com/marcopiovanello/yt-dlp-web-ui/releases/download/v${RELEASE}/yt-dlp-webui_linux-amd64" -o "/usr/local/bin/yt-dlp-webui"
|
|
||||||
chmod +x /usr/local/bin/yt-dlp-webui
|
|
||||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
|
||||||
msg_ok "Installed ${APPLICATION}"
|
|
||||||
|
|
||||||
msg_info "Installing yt-dlp"
|
|
||||||
curl -fsSL "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp" -o "/usr/local/bin/yt-dlp"
|
|
||||||
chmod a+rx /usr/local/bin/yt-dlp
|
|
||||||
msg_ok "Installed yt-dlp"
|
|
||||||
|
|
||||||
msg_info "Setting up ${APPLICATION}"
|
msg_info "Setting up ${APPLICATION}"
|
||||||
mkdir -p /opt/yt-dlp-webui
|
mkdir -p /opt/yt-dlp-webui
|
||||||
|
Loading…
x
Reference in New Issue
Block a user