2023-01-02 22:35:10 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
HOST=${PLUGIN_CLUSTER_HOST:-"/dns4/cluster.walkah.cloud"}
|
|
|
|
|
|
|
|
# pin to cluster
|
|
|
|
root_cid=$(ipfs-cluster-ctl \
|
|
|
|
--host "$HOST" \
|
|
|
|
--basic-auth "${PLUGIN_CLUSTER_USER}:${PLUGIN_CLUSTER_PASSWORD}" \
|
2023-01-22 17:33:31 -05:00
|
|
|
$PLUGIN_CLUSTER_ARGS \
|
2023-01-02 22:35:10 -05:00
|
|
|
add \
|
|
|
|
--quieter \
|
|
|
|
--cid-version 1 \
|
2023-01-22 17:33:31 -05:00
|
|
|
--name "${PLUGIN_DOMAIN}" \
|
2023-01-02 22:35:10 -05:00
|
|
|
--recursive \
|
2023-01-22 17:33:31 -05:00
|
|
|
--local \
|
2023-01-02 22:35:10 -05:00
|
|
|
$PLUGIN_EXTRA_ARGS \
|
|
|
|
"$PLUGIN_PATH" )
|
|
|
|
|
2023-01-22 17:33:31 -05:00
|
|
|
if [ ! -x "$PLUGIN_CF_EMAIL" ]; then
|
|
|
|
export CF_API_EMAIL=$PLUGIN_CF_EMAIL
|
|
|
|
export CF_API_KEY=$PLUGIN_CF_APIKEY
|
|
|
|
dnslink-cloudflare -d $PLUGIN_DOMAIN -l "/ipfs/${root_cid}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Deployed: $root_cid"
|