@@ -14,20 +14,17 @@ setting_up_container
1414network_check
1515update_os
1616
17- msg_info " Installing IPFS"
18- RELEASE=$( curl -fsSL https://github.com/ipfs/kubo/releases/latest | grep " title>Release" | cut -d " " -f 4)
19- $STD curl -fsSL " https://github.com/ipfs/kubo/releases/download/${RELEASE} /kubo_${RELEASE} _linux-amd64.tar.gz" -o " kubo_${RELEASE} _linux-amd64.tar.gz"
20- tar -xzf " kubo_${RELEASE} _linux-amd64.tar.gz" -C /usr/local
17+ fetch_and_deploy_gh_release " kubo" " ipfs/kubo" " prebuild" " latest" " /usr/local/kubo" " kubo*linux-amd64.tar.gz"
18+
19+ msg_info " Configuring IPFS"
2120$STD ln -s /usr/local/kubo/ipfs /usr/local/bin/ipfs
2221$STD ipfs init
2322ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
2423ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080
2524LXCIP=$( hostname -I | awk ' {print $1}' )
2625ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin " [\" http://${LXCIP} :5001\" , \" http://localhost:3000\" , \" http://127.0.0.1:5001\" , \" https://webui.ipfs.io\" , \" http://0.0.0.0:5001\" ]"
2726ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods ' ["PUT", "POST"]'
28- echo " ${RELEASE} " > " /opt/${APPLICATION} _version.txt"
29- $STD rm " kubo_${RELEASE} _linux-amd64.tar.gz"
30- msg_ok " Installed IPFS"
27+ msg_ok " Configured IPFS"
3128
3229msg_info " Creating Service"
3330cat << EOF >/etc/systemd/system/ipfs.service
@@ -43,7 +40,7 @@ Environment=HOME=/root
4340[Install]
4441WantedBy=multi-user.target
4542EOF
46- systemctl enable -- now -q ipfs.service
43+ systemctl enable -q -- now ipfs
4744msg_ok " Created Service"
4845
4946motd_ssh
0 commit comments