Consistent paths for downloaded binaries
This commit is contained in:
parent
73fbcb0508
commit
a8b0536b3f
@ -11,9 +11,9 @@
|
||||
FROM alpine:latest
|
||||
MAINTAINER "gitlab.com/pepa65 <pepa65@passchier.net>"
|
||||
RUN apk update && apk add bash php php-fpm ffmpeg tzdata file
|
||||
ADD https://good4.eu/mailer /usr/bin/mailer
|
||||
ADD https://good4.eu/mailer /usr/local/bin/mailer
|
||||
#ADD https://caddyserver.com/api/download?os=linux&arch=amd64&idempotency=74472262832423 /usr/bin/caddy
|
||||
ADD https://good4.eu/caddy /usr/bin/caddy
|
||||
ADD https://good4.eu/caddy /usr/local/bin/caddy
|
||||
COPY Caddyfile Dockerfile /root/
|
||||
WORKDIR /var/www
|
||||
COPY encode init stream vars mailhash ./
|
||||
|
||||
@ -59,14 +59,14 @@ Make the config file `/root/Caddyfile` like:
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Make sure internet is reachable
|
||||
while ! /usr/bin/ping -q -c 1 1.1.1.1 &>/dev/null
|
||||
while ! ping -q -c 1 1.1.1.1 &>/dev/null
|
||||
do sleep 1
|
||||
done
|
||||
|
||||
cd /root
|
||||
/usr/local/bin/caddy stop &>/dev/null
|
||||
sleep 1
|
||||
/usr/bin/killall -9 caddy &>/dev/null
|
||||
killall -9 caddy &>/dev/null
|
||||
/usr/local/bin/caddy start &>/root/caddy.log
|
||||
```
|
||||
and make it executable: `chmod +x /root/Caddy`.
|
||||
|
||||
2
encode
2
encode
@ -38,7 +38,7 @@ Mail(){ # 1:kind(0:done, 1:wrong type, 2:encoding error) 2:logline I:repopath,em
|
||||
msg[2]="Heya,\n\nThe file '$name' started encoding on $start but ran into an error on $finish.\n\nStream Upload server\n"
|
||||
if [[ $to && $user && $password && $smtp && $port ]]
|
||||
then # All ingredients for a mail present
|
||||
mailer -m "$(echo -e "${msg[$1]}")" -t "$to" -s "${sbj[$1]}" -u "$user" -p "$password" -S "$smtp" -P "$port" -f "$from" 2>"$repopath/mailer.log" &&
|
||||
/usr/local/bin/mailer -m "$(echo -e "${msg[$1]}")" -t "$to" -s "${sbj[$1]}" -u "$user" -p "$password" -S "$smtp" -P "$port" -f "$from" 2>"$repopath/mailer.log" &&
|
||||
Log "== Mail with subject '${sbj[$1]}' sent to $to" ||
|
||||
Log "== Mail with subject '${sbj[$1]}' failed to send to: $to"
|
||||
Log "Start encoding on $start, finished on $finish"
|
||||
|
||||
4
init
4
init
@ -20,9 +20,9 @@ sed -i "s/%sslmail%/$sslmail/" /root/Caddyfile
|
||||
[[ $interface ]] || interface=:80
|
||||
sed -i "s/%interface%/$interface/" /root/Caddyfile
|
||||
|
||||
chmod +x /usr/bin/caddy /usr/bin/mailer
|
||||
chmod +x /usr/local/bin/caddy /usr/local/bin/mailer
|
||||
|
||||
php-fpm8 -R
|
||||
caddy start --config /root/Caddyfile --adapter caddyfile >caddy.log
|
||||
/usr/local/bin/caddy start --config /root/Caddyfile --adapter caddyfile >caddy.log
|
||||
|
||||
sleep 9999d
|
||||
|
||||
Loading…
Reference in New Issue
Block a user