bundles/mixcloud-downloader: add login via netrc
This commit is contained in:
parent
52b68d6e42
commit
5a86e657ff
4 changed files with 23 additions and 2 deletions
|
@ -1,11 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
OPTS=""
|
||||
OPTS="--netrc"
|
||||
OPTS="$OPTS --netrc-location /opt/mixcloud-downloader/netrc"
|
||||
OPTS="$OPTS --retry-sleep linear=1::2"
|
||||
OPTS="$OPTS --retry-sleep fragment:exp=1:60"
|
||||
OPTS="$OPTS --extractor-retries 5"
|
||||
if [[ -n "$DEBUG" ]]
|
||||
then
|
||||
set -x
|
||||
else
|
||||
OPTS="-q"
|
||||
OPTS="$OPTS -q"
|
||||
fi
|
||||
|
||||
set -euo pipefail
|
||||
|
|
3
bundles/mixcloud-downloader/files/netrc
Normal file
3
bundles/mixcloud-downloader/files/netrc
Normal file
|
@ -0,0 +1,3 @@
|
|||
% for domain, data in sorted(node.metadata.get('mixcloud-downloader/netrc', {}).items()):
|
||||
machine ${domain} login ${data['username']} password ${data['password']}
|
||||
% endfor
|
|
@ -6,3 +6,9 @@ files['/opt/mixcloud-downloader/download.sh'] = {
|
|||
directories['/opt/mixcloud-downloader'] = {
|
||||
'owner': 'kunsi',
|
||||
}
|
||||
|
||||
files['/opt/mixcloud-downloader/netrc'] = {
|
||||
'content_type': 'mako',
|
||||
'mode': '0400',
|
||||
'owner': 'kunsi',
|
||||
}
|
||||
|
|
|
@ -101,6 +101,14 @@ nodes['home.nas'] = {
|
|||
'home.lgtv-wohnzimmer',
|
||||
},
|
||||
},
|
||||
'mixcloud-downloader': {
|
||||
'netrc': {
|
||||
'soundcloud': {
|
||||
'username': 'oauth',
|
||||
'password': bwpass.attr('soundcloud.com/hi@kunsmann.eu', 'oauth_token'),
|
||||
},
|
||||
},
|
||||
},
|
||||
'mosquitto': {
|
||||
'bridges': {
|
||||
'c3voc': {
|
||||
|
|
Loading…
Reference in a new issue