diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-09-22 08:29:39 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-09-22 08:29:39 +0300 |
commit | f05cd0bbe0dc70de923f22eb49cef9be085106b4 (patch) | |
tree | 612ab2e40107f587ff8799182cf84d894ffe4cff /ansible/exolobe1.yml | |
parent | 18b391529030b2ceb6097380eb88ef7090ca67ad (diff) | |
download | ansibleness-f05cd0bbe0dc70de923f22eb49cef9be085106b4.tar.gz |
exolobe1: only install Radicle once a week
Sponsored-by: author
Diffstat (limited to 'ansible/exolobe1.yml')
-rw-r--r-- | ansible/exolobe1.yml | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ansible/exolobe1.yml b/ansible/exolobe1.yml index 22251e5..8835572 100644 --- a/ansible/exolobe1.yml +++ b/ansible/exolobe1.yml @@ -185,7 +185,20 @@ - name: "install radicle using installer" shell: | - if [ ! -e /home/liw/.radicle/bin/rad ]; then + filename="/home/liw/.radicle/bin/rad" + + install=false + if [ ! -e "$filename" ]; then + install=true + else + weekago="$(date -d 'week ago' +%s)" + mtime="$(stat -c %Y "$filename")" + if [ "$mtime" -lt "$weekago" ]; then + install=true + fi + fi + + if $install; then curl -sSf https://radicle.xyz/install | sudo -u liw bash fi |