aboutsummaryrefslogtreecommitdiff
path: root/contrib/snap/daemon.bash
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/snap/daemon.bash')
-rwxr-xr-xcontrib/snap/daemon.bash11
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/snap/daemon.bash b/contrib/snap/daemon.bash
new file mode 100755
index 000000000..dfbf5e3f6
--- /dev/null
+++ b/contrib/snap/daemon.bash
@@ -0,0 +1,11 @@
+#!/bin/bash -e
+
+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