Ver Fonte

Try to fix Snap WRITABLE_FILES.

Thanks to xet7 !
Lauri Ojansivu há 3 anos atrás
pai
commit
4ca7b0dad7

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
snap-src/bin/config


+ 0 - 6
snap-src/bin/mongodb-control

@@ -24,12 +24,6 @@ if test -f "$SNAP_COMMON/mongodb.log"; then
    rm -f "$SNAP_COMMON/mongodb.log"
 fi
 
-# If uploads directory does not exist, create it.
-# Wekan will store attachments there.
-if [ ! -d "${WRITABLE_PATH}" ]; then
-   mkdir "${WRITABLE_PATH}"
-fi
-
 # Alternative: When starting MongoDB, and using logfile, truncate log to last 1000 lines of text.
 # 1) If file exists:
 #if test -f "$SNAP_COMMON/mongodb.log"; then

+ 7 - 0
snap-src/bin/wekan-control

@@ -16,6 +16,13 @@ else
     export MONGO_URL="mongodb://$MONGODB_BIND_IP:$MONGODB_PORT/wekan"
 fi
 
+# If uploads directory does not exist, create it.
+# Wekan will store attachments there.
+export WRITABLE_PATH=$SNAP_COMMON/files
+if [ ! -d $WRITABLE_PATH ]; then
+  mkdir $WRITABLE_PATH
+fi
+
 echo -e "MONGO_URL=$MONGO_URL"
 APPLICATION_DIRECTORY=$SNAP
 APPLICATION_START=main.js

+ 6 - 6
snap-src/bin/wekan-help

@@ -15,12 +15,12 @@ echo -e "\t$ snap set $SNAP_NAME debug='true'"
 echo -e "\t-Disable the Debug of Wekan:"
 echo -e "\t$ snap unset $SNAP_NAME debug"
 echo -e "\n"
-echo -e "Writable path. Snap can not write outside of /var/snap/wekan/common sandbox directory."
-echo -e "Default:"
-echo -e "\t$ snap set $SNAP_NAME writable-path='\$SNAP_COMMON\uploads'"
-echo -e "\t-To set different path, usually not needed:"
-echo -e "\t$ snap set $SNAP_NAME writable-path='\$SNAP_COMMON\uploads2'"
-echo -e "\n"
+#echo -e "Writable path. Snap can not write outside of /var/snap/wekan/common sandbox directory."
+#echo -e "Default:"
+#echo -e "\t$ snap set $SNAP_NAME writable-path='\$SNAP_COMMON\files'"
+#echo -e "\t-To set different path, usually not needed:"
+#echo -e "\t$ snap set $SNAP_NAME writable-path='\$SNAP_COMMON\files2'"
+#echo -e "\n"
 echo -e "Mongo log destimation: devnull/snapcommon/syslog. Default: 'devnull'"
 echo -e "To set different mongo log destination of Wekan:"
 echo -e "\t$ snap set $SNAP_NAME mongo-log-destination='snapcommon'"

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff