From 7a30bce2176a7f040df3247ee770a5f75e6aecc8 Mon Sep 17 00:00:00 2001 From: luccioman Date: Mon, 4 Feb 2019 14:34:37 +0100 Subject: Added a stop command using the existing stop script to the snap package --- addon/snap/exportYacyDataPath.sh | 12 ++++++++++++ addon/snap/snapPasswd.sh | 13 +++---------- addon/snap/snapStopYACY.sh | 9 +++++++++ 3 files changed, 24 insertions(+), 10 deletions(-) create mode 100755 addon/snap/exportYacyDataPath.sh create mode 100755 addon/snap/snapStopYACY.sh (limited to 'addon') 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 -- cgit v1.2.3