diff options
-rwxr-xr-x | custom/uucp-mediaserver/scripts/queue | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/custom/uucp-mediaserver/scripts/queue b/custom/uucp-mediaserver/scripts/queue index 4789f90c..c4d3be1c 100755 --- a/custom/uucp-mediaserver/scripts/queue +++ b/custom/uucp-mediaserver/scripts/queue | |||
@@ -4,7 +4,7 @@ logTag=${0:t} | |||
4 | exec 1> >(logger -t "$logTag" -p news.notice) | 4 | exec 1> >(logger -t "$logTag" -p news.notice) |
5 | exec 2> >(logger -t "$logTag" -p news.error) | 5 | exec 2> >(logger -t "$logTag" -p news.error) |
6 | 6 | ||
7 | doDebug=false | 7 | doDebug=true |
8 | debug() { | 8 | debug() { |
9 | if $doDebug; then | 9 | if $doDebug; then |
10 | logger -t "$logTag" -p news.debug | 10 | logger -t "$logTag" -p news.debug |
@@ -70,6 +70,8 @@ while getopts "frp" OPT; do | |||
70 | done | 70 | done |
71 | shift $((OPTIND-1)) | 71 | shift $((OPTIND-1)) |
72 | 72 | ||
73 | printf "force: %d, noCall: %s, prepend: %s\n" ${force} ${noCall} ${prepend} | debug | ||
74 | |||
73 | for f (${@}); do | 75 | for f (${@}); do |
74 | f=$(readlink -f ${f}) | 76 | f=$(readlink -f ${f}) |
75 | if grep -q ${f} @queueDir@/${suffix}.queue; then | 77 | if grep -q ${f} @queueDir@/${suffix}.queue; then |
@@ -117,7 +119,9 @@ while true; do | |||
117 | printf "queuing ā%sā for %s\n" ${file:t} ${suffix} | debug | 119 | printf "queuing ā%sā for %s\n" ${file:t} ${suffix} | debug |
118 | function send() { | 120 | function send() { |
119 | typeset -a cmd | 121 | typeset -a cmd |
120 | cmd=(uux $(if ${noCall}; then echo "-r"; fi) -g z) | 122 | cmd=(uux) |
123 | $noCall && cmd+=("-r") | ||
124 | cmd+=(-g z) | ||
121 | 125 | ||
122 | compatibleName=${file} | 126 | compatibleName=${file} |
123 | function munge() { [[ $(mungefilename ${file}) != ${file} ]] } | 127 | function munge() { [[ $(mungefilename ${file}) != ${file} ]] } |