Skip to content

Commit

Permalink
Merge pull request #67 from sykuang/skip_token
Browse files Browse the repository at this point in the history
feat(skip token): Skip setting token when token is empty
  • Loading branch information
SuperNG6 committed Jul 5, 2023
2 parents f593329 + 0c4a0ea commit ecb44a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions root/etc/services.d/aria2/run
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#!/usr/bin/with-contenv bash

if [[ ! -z $SECRET ]];then
SECRET_TOKEN="rpc-secret=${SECRET}"
fi

exec \
s6-setuidgid abc aria2c \
--conf-path=/config/aria2.conf \
--rpc-secret=$SECRET \
$SECRET_TOKEN \
--disk-cache=$CACHE \
--quiet=$QUIET
> /dev/stdout \
2 > /dev/stderr

echo 'Exiting aria2'
echo 'Exiting aria2'

0 comments on commit ecb44a7

Please sign in to comment.