aboutsummaryrefslogtreecommitdiff
path: root/contrib/debian/bin
diff options
context:
space:
mode:
authorMatt Corallo <matt@bluematt.me>2011-10-25 16:48:36 -0400
committerMatt Corallo <matt@bluematt.me>2011-11-08 11:57:05 -0500
commit38f33ce4a318c8dbff648154ea4978d3ccaf8495 (patch)
tree2e1d1602ec3520ec1437f0a27c7d60f6c656ccfc /contrib/debian/bin
parent2b814d6eb08458c54273af8263d1f7a11f64edf5 (diff)
Add debian build folder
Diffstat (limited to 'contrib/debian/bin')
-rwxr-xr-xcontrib/debian/bin/bitcoin-qt16
-rwxr-xr-xcontrib/debian/bin/bitcoind18
2 files changed, 34 insertions, 0 deletions
diff --git a/contrib/debian/bin/bitcoin-qt b/contrib/debian/bin/bitcoin-qt
new file mode 100755
index 0000000000..f2eac1b1ab
--- /dev/null
+++ b/contrib/debian/bin/bitcoin-qt
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+umask 077
+
+basedir=~/.bitcoin
+dbfile="$basedir/DB_CONFIG"
+cfgfile="$basedir/bitcoin.conf"
+
+[ -e "$basedir" ] || mkdir "$basedir"
+
+# Bitcoin does not clean up DB log files by default
+[ -e "$dbfile" ] || echo 'set_flags DB_LOG_AUTOREMOVE' > "$dbfile"
+
+exec /usr/lib/bitcoin/bitcoin-qt "$@"
diff --git a/contrib/debian/bin/bitcoind b/contrib/debian/bin/bitcoind
new file mode 100755
index 0000000000..0904f76f7b
--- /dev/null
+++ b/contrib/debian/bin/bitcoind
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+umask 077
+
+basedir=~/.bitcoin
+dbfile="$basedir/DB_CONFIG"
+cfgfile="$basedir/bitcoin.conf"
+
+[ -e "$basedir" ] || mkdir "$basedir"
+
+[ -e "$cfgfile" ] || perl -le 'print"rpcpassword=",map{(a..z,A..Z,0..9)[rand 62]}0..9' > "$cfgfile"
+
+# Bitcoin does not clean up DB log files by default
+[ -e "$dbfile" ] || echo 'set_flags DB_LOG_AUTOREMOVE' > "$dbfile"
+
+exec /usr/lib/bitcoin/bitcoind "$@"