diff options
| author | luccioman <luccioman@users.noreply.github.com> | 2019-02-04 14:34:37 +0100 |
|---|---|---|
| committer | luccioman <luccioman@users.noreply.github.com> | 2019-02-04 14:34:37 +0100 |
| commit | 7a30bce2176a7f040df3247ee770a5f75e6aecc8 (patch) | |
| tree | f82800beb4643155b2da828afa93cd978487880c /addon | |
| parent | 5e9a08355a18989e456a5e58127e8eeb32196246 (diff) | |
Added a stop command using the existing stop script to the snap package
Diffstat (limited to 'addon')
| -rwxr-xr-x | addon/snap/exportYacyDataPath.sh | 12 | ||||
| -rwxr-xr-x | addon/snap/snapPasswd.sh | 13 | ||||
| -rwxr-xr-x | addon/snap/snapStopYACY.sh | 9 |
3 files changed, 24 insertions, 10 deletions
diff --git a/addon/snap/exportYacyDataPath.sh b/addon/snap/exportYacyDataPath.sh new file mode 100755 index 000000000..0afcace54 --- /dev/null +++ b/addon/snap/exportYacyDataPath.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +# Check the snap configuration to properly fill the YACY_DATA_PATH environment variable + +DATA_VERSIONED="$(snapctl get data.versioned)" +if [ "$DATA_VERSIONED" = "false" ]; then + # YaCy data is in the Snap common (non versioned) user data + YACY_DATA_PATH="$SNAP_USER_COMMON/DATA" +else + # Defaults : YaCy data is in the Snap versioned user data + YACY_DATA_PATH="$SNAP_USER_DATA/DATA" +fi +export YACY_DATA_PATH
\ No newline at end of file diff --git a/addon/snap/snapPasswd.sh b/addon/snap/snapPasswd.sh index 5449d5f0c..2b956cad7 100755 --- a/addon/snap/snapPasswd.sh +++ b/addon/snap/snapPasswd.sh @@ -2,15 +2,8 @@ # Wrapper script for Snap package specific instructions before calling the bin/passwd.sh script -# Check the snap configuration to properly fill the YACY_DATA_PATH environment variable -DATA_VERSIONED="$(snapctl get data.versioned)" -if [ "$DATA_VERSIONED" = "false" ]; then - # YaCy data is in the Snap common (non versioned) user data - YACY_DATA_PATH="$SNAP_USER_COMMON/DATA" -else - # Defaults : YaCy data is in the Snap versioned user data - YACY_DATA_PATH="$SNAP_USER_DATA/DATA" -fi -export YACY_DATA_PATH +cd "`dirname $0`" + +. ./exportYacyDataPath.sh sh "$SNAP/yacy/bin/passwd.sh"
\ No newline at end of file diff --git a/addon/snap/snapStopYACY.sh b/addon/snap/snapStopYACY.sh new file mode 100755 index 000000000..425e44c25 --- /dev/null +++ b/addon/snap/snapStopYACY.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +# Wrapper script for Snap package specific instructions before calling the stopYACY.sh script + +cd "`dirname $0`" + +. ./exportYacyDataPath.sh + +sh "$SNAP/yacy/stopYACY.sh"
\ No newline at end of file |
