Skip to content

Instantly share code, notes, and snippets.

@zerafachris
Created January 2, 2022 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zerafachris/215bb1c3aabe262b65363e73731ca4b3 to your computer and use it in GitHub Desktop.
Save zerafachris/215bb1c3aabe262b65363e73731ca4b3 to your computer and use it in GitHub Desktop.
# replace base url
if [ "${CRAWLAB_BASE_URL}" = "" ];
then
:
else
indexpath=/app/dist/index.html
sed -i "s?/js/?${CRAWLAB_BASE_URL}/js/?g" ${indexpath}
sed -i "s?/css/?${CRAWLAB_BASE_URL}/css/?g" ${indexpath}
fi
# start nginx
service nginx start
# start seaweedfs server
seaweedfsDataPath=/data/seaweedfs
if [ -e ${seaweedfsDataPath} ]; then
:
else
mkdir -p ${seaweedfsDataPath}
fi
weed server \
-dir /data \
-master.dir ${seaweedfsDataPath} \
-volume.dir.idx ${seaweedfsDataPath} \
-ip localhost \
-volume.port 9999 \
-filer \
>> /var/log/weed.log 2>&1 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment