forked from forkanization/Proxmox-arm64
Port Kubo to ARM64
This commit is contained in:
+4
-5
@@ -1,8 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/build.func)
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2024 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# Co-Author: ulmentflam
|
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
@@ -60,11 +59,11 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}
|
|||||||
msg_info "Updating $APP LXC"
|
msg_info "Updating $APP LXC"
|
||||||
apt-get update &>/dev/null
|
apt-get update &>/dev/null
|
||||||
apt-get -y upgrade &>/dev/null
|
apt-get -y upgrade &>/dev/null
|
||||||
wget -q "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-amd64.tar.gz"
|
wget -q "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-arm64.tar.gz"
|
||||||
tar -xzf "kubo_${RELEASE}_linux-amd64.tar.gz" -C /usr/local
|
tar -xzf "kubo_${RELEASE}_linux-arm64.tar.gz" -C /usr/local
|
||||||
systemctl restart ipfs.service
|
systemctl restart ipfs.service
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
rm "kubo_${RELEASE}_linux-amd64.tar.gz"
|
rm "kubo_${RELEASE}_linux-arm64.tar.gz"
|
||||||
msg_ok "Updated $APP LXC"
|
msg_ok "Updated $APP LXC"
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2024 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# Co-Author: ulmentflam
|
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
@@ -19,12 +18,14 @@ $STD apt-get install -y curl
|
|||||||
$STD apt-get install -y sudo
|
$STD apt-get install -y sudo
|
||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
$STD apt-get install -y gpg
|
$STD apt-get install -y gpg
|
||||||
|
$STD apt-get install -y wget
|
||||||
|
$STD apt-get install -y openssh-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing IPFS"
|
msg_info "Installing IPFS"
|
||||||
RELEASE=$(wget -q https://github.com/ipfs/kubo/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
RELEASE=$(wget -q https://github.com/ipfs/kubo/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||||
$STD wget -q "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-amd64.tar.gz"
|
$STD wget -q "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-arm64.tar.gz"
|
||||||
tar -xzf "kubo_${RELEASE}_linux-amd64.tar.gz" -C /usr/local
|
tar -xzf "kubo_${RELEASE}_linux-arm64.tar.gz" -C /usr/local
|
||||||
$STD ln -s /usr/local/kubo/ipfs /usr/local/bin/ipfs
|
$STD ln -s /usr/local/kubo/ipfs /usr/local/bin/ipfs
|
||||||
$STD ipfs init
|
$STD ipfs init
|
||||||
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
|
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
|
||||||
@@ -33,7 +34,7 @@ LXCIP=$(hostname -I | awk '{print $1}')
|
|||||||
ipfs 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\"]"
|
ipfs 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\"]"
|
||||||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'
|
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'
|
||||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
$STD rm "kubo_${RELEASE}_linux-amd64.tar.gz"
|
$STD rm "kubo_${RELEASE}_linux-arm64.tar.gz"
|
||||||
msg_ok "Installed IPFS"
|
msg_ok "Installed IPFS"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|||||||
Reference in New Issue
Block a user