Skip to content

Commit

Permalink
added .net
Browse files Browse the repository at this point in the history
added .net
  • Loading branch information
awirthy committed Feb 9, 2023
1 parent 73d15b1 commit 2f862a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions DownloadYouTubev2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ function IsValidEmail {
param([string]$EmailAddress)

try {
$null = [mailaddress]$EmailAddress
return $true
$null = [mailaddress]$EmailAddress;
return $true;
}
catch {
return $false
return $false;
}
}

Expand Down
2 changes: 1 addition & 1 deletion DownloadYouTubev2.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# /etc/cron.d/ytdl
#
pwsh /opt/DownloadYouTubev2/DownloadYouTubev2-0.20.1/DownloadYouTubev2.ps1 >> /proc/1/fd/1;
pwsh /opt/DownloadYouTubev2/DownloadYouTubev2-0.20.2/DownloadYouTubev2.ps1 >> /proc/1/fd/1;
echo "DONE" >> /proc/1/fd/1;
8 changes: 5 additions & 3 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,24 @@ RUN apk update --no-cache
RUN apk upgrade --no-cache
RUN wget -O /usr/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
RUN chmod +x /usr/bin/yt-dlp
RUN apk --no-cache add dotnet6-sdk
RUN apk --no-cache add aspnetcore6-runtime
RUN apk --no-cache add ca-certificates python3 py3-pip ffmpeg tzdata nano less ncurses-terminfo-base krb5-libs libgcc libintl libssl1.1 libstdc++ userspace-rcu zlib icu-libs curl lttng-ust
RUN wget -O /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell-7.3.1-linux-alpine-x64.tar.gz
RUN mkdir -p /opt/microsoft/powershell/7
RUN tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7
RUN chmod +x /opt/microsoft/powershell/7/pwsh
RUN ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
RUN wget -O /tmp/DownloadYouTubev2.tar.gz https://github.com/awirthy/DownloadYouTubev2/archive/refs/tags/v0.20.1.tar.gz
RUN wget -O /tmp/DownloadYouTubev2.tar.gz https://github.com/awirthy/DownloadYouTubev2/archive/refs/tags/v0.20.2.tar.gz
RUN mkdir -p /opt/DownloadYouTubev2
RUN tar zxf /tmp/DownloadYouTubev2.tar.gz -C /opt/DownloadYouTubev2
###### install mutt
RUN apk --no-cache add mutt
###### install cron
RUN apk add --update bash
RUN echo "#!/bin/sh" >> /etc/periodic/15min/DownloadYouTubev2
RUN echo "/opt/DownloadYouTubev2/DownloadYouTubev2-0.20.1/DownloadYouTubev2.sh" >> /etc/periodic/15min/DownloadYouTubev2
RUN chmod 755 /opt/DownloadYouTubev2/DownloadYouTubev2-0.20.1/DownloadYouTubev2.sh
RUN echo "/opt/DownloadYouTubev2/DownloadYouTubev2-0.20.2/DownloadYouTubev2.sh" >> /etc/periodic/15min/DownloadYouTubev2
RUN chmod 755 /opt/DownloadYouTubev2/DownloadYouTubev2-0.20.2/DownloadYouTubev2.sh
RUN chmod 755 /etc/periodic/15min/DownloadYouTubev2
CMD ["crond", "-f","-l","8"]

Expand Down

0 comments on commit 2f862a2

Please sign in to comment.