-case $distro in
- debian|ubuntu) spa android-tools-adbd/unstable ;;
- arch) spa android-tools ;;
- # other distros unknown
-esac
-
-case $distro in
- debian)
- if [[ `debian-archive` == testing ]]; then
- # has no unstable dependencies
- spa bitcoin-qt/unstable
- fi
- s cp /a/opt/bitcoin/contrib/init/bitcoind.service /etc/systemd/system
- ser daemon-reload
-
- dir=/nocow/.bitcoin
- s mkdir -p $dir
- s chown -R bitcoin:bitcoin $dir
- dir=/etc/bitcoin
- s mkdir -p $dir
- s chown -R root:bitcoin $dir
- s chmod 750 $dir
- f=$dir/bitcon.conf
-
- # pruning decreases the bitcoin dir to 2 gb, keeps
- # just the recent blocks. can't do a few things like
- # import a wallet dump.
- # pruning works, but people had to do
- # some manual stuff in joinmarket. I dun need the
- # disk space, so not bothering yet, maybe in a year or so.
- # https://github.com/JoinMarket-Org/joinmarket/issues/431
- #https://bitcoin.org/en/release/v0.12.0#wallet-pruning
- #prune=550
-
- s dd of=$f <<EOF
-rpcbind=127.0.0.1
-server=1
-rpcpassword=$(openssl rand -base64 32)
-rpcuser=$(openssl rand -base64 32)
-
-# Joinmarket
-walletnotify=curl -sI --connect-timeout 1 http://localhost:62602/walletnotify?%s
-alertnotify=curl -sI --connect-timeout 1 http://localhost:62602/alertnotify?%s
-EOF
- ;;
- # other distros unknown
-esac
-if [[ $HOSTNAME == treetowl ]]; then
- pi libsodium-dev python3-pip
- cd /a/opt/joinmarket
- # using develop branch, as it seems to be mostly bug fixes,
- # and this is quite new software.
- # note: python3 does not work.
- pip install -r requirements.txt
- # we need bitcoin.conf in the data dir according to
- # https://github.com/JoinMarket-Org/joinmarket/wiki/Running-JoinMarket-with-Bitcoin-Core-full-node
- # following the example .service script, I don\'t have it there,
- # and I generate it, so lets just symlink it.
- sudo -u bitcoin ln -sf /etc/bitcoin/bitcoin.conf /nocow/.bitcoin
-
- # one time, manually did python wallet-tool.py generate.
- # The "wallet" is just a key which deterministically generates addresses.
- # One time: move the wallet, then link to it.
- # ln -s /p/joinmarket/wallet.json wallets
- #
- # see wallet addresses via:
- # python wallet-tool.py wallet.json
- # send to the first 3 mixing depth 0 addresses.
- # depths are like "identities", to separate out association with
- # each other. the big hash in that output is the depth/branch id,
- # ignore it afaik.
- #
- # after sending btc to wallet from a 3rd party service, check that
- # at least 20% of utxo of each transaction was sent to you,
- # btc listtransactions 10 0 true
- # btc getrawtransaction TXID 1
- #
- # to view status, do
- # python wallet-tool.py wallet.json history
- #
- # to help make other people,
- # python yield-generator-basic.py wallet.json
-
- for var in rpcuser rpcpassword; do
- u="$(s sed -rn "s/^$var=(.*)/\1/p" /etc/bitcoin/bitcoin.conf)"
- # escape backslashes
- u="${u//\\/\\\\\\\\}"
- # escape commas
- u="${u//,/\\,}"
- sed -ri "s,^(rpc_${var#rpc}\s*=).*,\1 $u," joinmarket.cfg
- done
- sed -ri "s/^\s*(blockchain_source\s*=).*/\1 bitcoin-rpc/" joinmarket.cfg
-
- # dunno about sharing a wallet between multiple instances
- # manually did, wallet.dat symlinked in /nocow/.bitcoin
- sgo bitcoind
-fi
-
-
-
-
-# proprietary flash. going without for now
-# case $distro in
-# debian)
-# pi flashplugin-nonfree
-# esac
-
-
-
-case $distro in
- fedora)
- cd $(mktemp -d)
- wget http://tamacom.com/global/global-6.3.2.tar.gz
- ex global*
- cd global-6.3.2
- # based on https://github.com/leoliu/ggtags
- ./configure --with-exuberant-ctags=/usr/bin/ctags
- make
- s make install
- s pip install pygments
- ;;
- *)
- pi global
- ;;&
- arch)
- pi python2-pygments
- ;;
- debian|ubuntu)
- pi python-pygments
- ;;
-esac
-
-
-case $distro in
- debian)
- pi task-cinnamon-desktop
- # in settings, change scrolling to two-finger,
- # because the default edge scroll doesn\'t work.
- pu transmission-gtk
- ;;
- # others unknown
-esac
-
-case $distro in
- arch) spa apg ;;
-
- # already in debian jessie
-esac
-
-
-
-
-# note this failed running at the beginning of this file,
-# because no systemd user instance was running.
-# Doing systemd --user resulted in
-# Trying to run as user instance, but $XDG_RUNTIME_DIR is not set
-
-if isdebian-testing; then
- # as of 7/2016, has no unstable deps, and is not in testing anymore.
- pi synergy/unstable
-else
- pi synergy
-fi
-
-# case $distro in
-# # ubuntu unknown. probably the same as debian, just check if the
-# # init scripts come with the package.
-# debian)
-# # copied from arch, but moved to etc
-# s dd of=/etc/systemd/user/synergys.service <<'EOF'
-# [Unit]
-# Description=Synergy Server Daemon
-# After=network.target
-
-# [Service]
-# User=%i
-# ExecStart=/usr/bin/synergys --no-daemon --config /etc/synergy.conf
-# Restart=on-failure
-
-# [Install]
-# WantedBy=multi-user.target
-# EOF
-# s dd of=/etc/systemd/user/synergys.socket <<'EOF'
-# [Unit]
-# Conflicts=synergys@.service
-
-# [Socket]
-# ListenStream=24800
-# Accept=false
-
-# [Install]
-# WantedBy=sockets.target
-# EOF
-# # had this fail with 'Failed to connect to bus: No such file or directory'
-# # then when I tried it manually, it worked fine...
-# if ! systemctl --user daemon-reload; then
-# sleep 2
-# echo retrying systemd user daemon reload
-# systemctl --user daemon-reload
-# fi
-# ;;&
-# *)
-# # taken from arch wiki.
-# s dd of=/etc/systemd/system/synergyc@.service <<'EOF'
-# [Unit]
-# Description=Synergy Client
-# After=network.target
-
-# [Service]
-# User=%i
-# ExecStart=/usr/bin/synergyc --no-daemon frodo
-# Restart=on-failure
-# # per man systemd.unit, StartLimitInterval, by default we
-# # restart more than 5 times in 10 seconds.
-# # And this param defaults too 200 miliseconds.
-# RestartSec=3s
-
-# [Install]
-# WantedBy=multi-user.target
-# EOF
-# s systemctl daemon-reload
-# case $HOSTNAME in
-# x2|treetowl)
-# ser enable synergyc@ian
-# ser start synergyc@ian ||: # X might not be running yet
-# ;;
-# frodo)
-# systemctl --user start synergys ||:
-# systemctl --user enable synergys
-# ;;
-# esac
-# ;;
-# esac
-