diff options
author | Casey Marshall <casey.marshall@canonical.com> | 2016-09-01 14:23:36 -0500 |
---|---|---|
committer | Casey Marshall <casey.marshall@canonical.com> | 2016-09-11 11:17:12 -0500 |
commit | 0a56d83d3d8d6369b350ec2810752b683a4a1a3e (patch) | |
tree | 2e1fd4f97a40e437c531b54dcce39f0724d3c310 /contrib/snap | |
parent | Merge pull request #1041 (diff) | |
download | monero-0a56d83d3d8d6369b350ec2810752b683a4a1a3e.tar.xz |
Add snap packaging.
This adds [snap](https://snapcraft.io) packaging to the project. See the
link for more information on snaps. Snap packages install on all Linux
distributions. On Ubuntu, snap confinement with apparmor and seccomp
provide an additional layer of security.
This snap sets up monerod as a systemd service, which should start
immediately on install. To access the wallet CLI, simply run `monero`
(/snap/bin/monero). I think it's a really quick & easy way to get
started with monero.
I've made some opinionated decisions in the packaging just to kick this
off, but I'm happy to iterate on this stuff.
Diffstat (limited to 'contrib/snap')
-rwxr-xr-x | contrib/snap/daemon.bash | 11 | ||||
-rwxr-xr-x | contrib/snap/log.bash | 3 | ||||
-rwxr-xr-x | contrib/snap/wallet.bash | 6 |
3 files changed, 20 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 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..04aa6c525 --- /dev/null +++ b/contrib/snap/wallet.bash @@ -0,0 +1,6 @@ +#!/bin/bash -e + +export HOME=${SNAP_USER_DATA} +cd ${SNAP_USER_DATA} + +exec ${SNAP}/usr/bin/rlwrap ${SNAP}/bin/monero-wallet-cli "$@" |