aboutsummaryrefslogtreecommitdiff
path: root/contrib/snap
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/snap')
-rwxr-xr-xcontrib/snap/daemon.bash12
-rwxr-xr-xcontrib/snap/log.bash3
-rwxr-xr-xcontrib/snap/wallet.bash7
3 files changed, 22 insertions, 0 deletions
diff --git a/contrib/snap/daemon.bash b/contrib/snap/daemon.bash
new file mode 100755
index 000000000..41d1275de
--- /dev/null
+++ b/contrib/snap/daemon.bash
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+export LD_LIBRARY_PATH=${SNAP_LIBRARY_PATH}:${SNAP}/usr/lib/x86_64-linux-gnu
+export HOME=${SNAP_DATA}
+cd ${SNAP_DATA}
+
+ARGS=
+if [ -e "${SNAP_DATA}/etc/monerod.conf" ]; then
+ ARGS="--config-file ${SNAP_DATA}/etc/monerod.conf"
+fi
+
+exec ${SNAP}/bin/monerod --detach $ARGS
diff --git a/contrib/snap/log.bash b/contrib/snap/log.bash
new file mode 100755
index 000000000..c81efeb2c
--- /dev/null
+++ b/contrib/snap/log.bash
@@ -0,0 +1,3 @@
+#!/bin/bash -e
+
+exec tail -c +0 -F ${SNAP_DATA}/.bitmonero/bitmonero.log
diff --git a/contrib/snap/wallet.bash b/contrib/snap/wallet.bash
new file mode 100755
index 000000000..004f1371e
--- /dev/null
+++ b/contrib/snap/wallet.bash
@@ -0,0 +1,7 @@
+#!/bin/bash -e
+
+export LD_LIBRARY_PATH=${SNAP_LIBRARY_PATH}:${SNAP}/usr/lib/x86_64-linux-gnu
+export HOME=${SNAP_USER_DATA}
+cd ${SNAP_USER_DATA}
+
+exec ${SNAP}/usr/bin/rlwrap ${SNAP}/bin/monero-wallet-cli "$@"