Commit 6fbc195e authored by nimrod's avatar nimrod
Browse files

Improve rclone handling.

Automate the password handling once the password database is downloaded.
parent 0eb58386
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -231,6 +231,10 @@ prune_ssh_sockets () {
        -execdir sh -c 'lsof -t "$1" >/dev/null || rm "$1"' _ {} \;
}

rcnc () {
    RCLONE_CONFIG_NEXTCLOUD_PASS="$(rclone obscure "$(ph show --field 'Password' 'shore.co.il/LDAP')")" rclone "$@"
}

set_title () {
    local default_title
    default_title="$(basename "$PWD")"
+1 −1
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@
type = webdav
url = https://nextcloud.shore.co.il/remote.php/webdav/
vendor = nextcloud
user = nimrod
+5 −1
Original line number Diff line number Diff line
@@ -2,7 +2,11 @@
# pylint: disable=invalid-name

"""Runs rclone securely to download the Keepass password database from
Nextcloud."""
Nextcloud.

This is meant as a bootstrap step to get the Keepass password database
so that other steps that depend on the database can be used.
"""

import getpass
import os