File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,10 @@ function update_script() {
4040 wget -q " https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE} .tar.gz" -O $temp_file
4141 tar -xzf $temp_file
4242 cp -rf GoMFT-${RELEASE} /* /opt/gomft
43+ cd /opt/gomft
44+ $STD go mod download
45+ $STD go build -o gomft
4346 $STD $HOME /go/bin/templ generate
44- wget -q " https://github.com/StarFleetCPTN/GoMFT/releases/download/v${RELEASE} /gomft-v${RELEASE} -linux-amd64" -O /opt/gomft/gomft
4547 chmod +x /opt/gomft/gomft
4648 echo " ${RELEASE} " > /opt/${APP} _version.txt
4749 msg_ok " Updated $APP to ${RELEASE} "
Original file line number Diff line number Diff line change @@ -35,16 +35,17 @@ set -o pipefail
3535msg_ok " Setup Golang"
3636
3737msg_info " Setup ${APPLICATION} "
38- temp_file2 =$( mktemp)
38+ temp_file =$( mktemp)
3939RELEASE=$( curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
40- wget -q " https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE} .tar.gz" -O $temp_file2
41- tar -xzf $temp_file2
40+ wget -q " https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE} .tar.gz" -O $temp_file
41+ tar -xzf $temp_file
4242mv GoMFT-${RELEASE} / /opt/gomft
4343cd /opt/gomft
44+ $STD go mod download
45+ $STD go build -o gomft
46+ chmod +x gomft
4447$STD go install github.com/a-h/templ/cmd/templ@latest
45- wget -q " https://github.com/StarFleetCPTN/GoMFT/releases/download/v${RELEASE} /gomft-v${RELEASE} -linux-amd64" -O gomft
4648$STD $HOME /go/bin/templ generate
47- chmod +x gomft
4849JWT_SECRET_KEY=$( openssl rand -base64 24 | tr -d ' /+=' )
4950
5051cat << EOF >/opt/gomft/.env
@@ -93,7 +94,7 @@ motd_ssh
9394customize
9495
9596msg_info " Cleaning up"
96- rm -f $temp_file $temp_file2
97+ rm -f $temp_file
9798$STD apt-get -y autoremove
9899$STD apt-get -y autoclean
99100msg_ok " Cleaned"
You can’t perform that action at this time.
0 commit comments