diff options
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 |
