summaryrefslogtreecommitdiffstats
path: root/btc/mining/bin/newkey.sh
blob: e71ab85b54f0c4fd509386ad6c96703567d5c1cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

auth=$HOME/.Xauthority
cp /dev/null $auth

if [ "$1" = "-md5" ]; then
  key=`pstat -pfS | md5`
else
  key=`perl -e 'srand; printf int(rand(10000000000000))'`
  key=$key$key
fi

xauth add unix:0 . $key

xauth add ${HOST}:0 . $key