dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

gpg-extend-expire.sh (1114B)


      1 #!/bin/sh
      2 set -e
      3 
      4 key="5C959DF243CE4DD17A5B2610B790F4AD1BF858FE"  # --list-keys anders@adamsgaard.dk
      5 gpg="gpg2"
      6 pubkey_file="/tmp/ad-public-key.asc"
      7 expire="1y"
      8 
      9 
     10 $gpg --quick-set-expire "$key" "$expire"
     11 
     12 echo "##########################################"
     13 echo "##########################################"
     14 echo "####                                  ####"
     15 echo "####        TYPE THE FOLLOWING:       ####"
     16 echo "####                                  ####"
     17 echo "####            gpg> key 1            ####"
     18 echo "####            gpg> expire           ####"
     19 echo "####            gpg> $expire               ####"
     20 echo "####            gpg> y                ####"
     21 echo "####            gpg> save             ####"
     22 echo "####                                  ####"
     23 echo "##########################################"
     24 echo "##########################################"
     25 
     26 $gpg --edit-key "$key"
     27 
     28 $gpg --armor --export "$key" > "$pubkey_file"
     29 scp "$pubkey_file" ad@adamsgaard.dk:/var/www/domains/adamsgaard.dk/files/
     30 
     31 $gpg --keyserver pool.sks-keyservers.net --send-keys "$key"
     32 $gpg --keyserver pgp.mit.edu --send-keys "$key"