From b87c8dbc12aaefb77d275f6401906e1687ed2e9c Mon Sep 17 00:00:00 2001 From: l-n-s Date: Sat, 19 Aug 2017 15:52:52 -0400 Subject: [PATCH] Fixed wrapper and renamed app to i2pd.daemon --- README.md | 8 ++++---- snap/i2pd-wrapper | 10 +++++----- snap/snapcraft.yaml | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 9617675..39b76dc 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,13 @@ distributions.

Managing with systemd: - systemctl status snap.i2pd.i2pd.service - systemctl stop snap.i2pd.i2pd.service - systemctl start snap.i2pd.i2pd.service + systemctl status snap.i2pd.daemon.service + systemctl stop snap.i2pd.daemon.service + systemctl start snap.i2pd.daemon.service View logs: - journalctl -u snap.i2pd.i2pd + journalctl -u snap.i2pd.daemon Graceful router shutdown: diff --git a/snap/i2pd-wrapper b/snap/i2pd-wrapper index d8cd2e6..c226641 100755 --- a/snap/i2pd-wrapper +++ b/snap/i2pd-wrapper @@ -1,9 +1,9 @@ #!/bin/sh -if [ ! -d "$SNAP_USER_DATA/.i2pd" ]; then - mkdir $SNAP_USER_DATA/.i2pd/ - cp -R $SNAP/certificates $SNAP_USER_DATA/.i2pd/ - cp -R $SNAP/i2pd.conf $SNAP_USER_DATA/.i2pd/ +if [ ! -d "$SNAP_DATA/datadir" ]; then + mkdir $SNAP_DATA/datadir/ + cp -R $SNAP/certificates $SNAP_DATA/datadir/ + cp -R $SNAP/i2pd.conf $SNAP_DATA/datadir/ fi -exec "$SNAP/bin/i2pd" "$@" +exec "$SNAP/bin/i2pd" --datadir=$SNAP_DATA/datadir/ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 1854d95..96b1530 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -19,14 +19,14 @@ grade: devel confinement: strict apps: - i2pd: + daemon: command: i2pd-wrapper daemon: simple plugs: [network,network-bind] graceful-shutdown: - command: kill -2 `cat $SNAP_USER_DATA/.i2pd/i2pd.pid` + command: kill -2 `cat $SNAP_DATA/datadir/i2pd.pid` reload-tunnels-conf: - command: kill -1 `cat $SNAP_USER_DATA/.i2pd/i2pd.pid` + command: kill -1 `cat $SNAP_DATA/datadir/i2pd.pid` parts: i2pd: