GoFMT general fixes
This commit is contained in:
parent
4243a4f400
commit
4d5e23c0a0
@ -41,9 +41,14 @@ function update_script() {
|
|||||||
tar -xzf $temp_file
|
tar -xzf $temp_file
|
||||||
cp -rf GoMFT-${RELEASE}/* /opt/gomft
|
cp -rf GoMFT-${RELEASE}/* /opt/gomft
|
||||||
wget -q "https://github.com/StarFleetCPTN/GoMFT/releases/download/v${RELEASE}/gomft-v${RELEASE}-linux-amd64" -O /opt/gomft/gomft
|
wget -q "https://github.com/StarFleetCPTN/GoMFT/releases/download/v${RELEASE}/gomft-v${RELEASE}-linux-amd64" -O /opt/gomft/gomft
|
||||||
|
chmod +x /opt/gomft/gomft
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
msg_ok "Updated $APP to ${RELEASE}"
|
msg_ok "Updated $APP to ${RELEASE}"
|
||||||
|
|
||||||
|
msg_info "Cleaning Up"
|
||||||
|
rm -f $temp_file
|
||||||
|
msg_ok "Cleanup Complete"
|
||||||
|
|
||||||
msg_info "Starting $APP"
|
msg_info "Starting $APP"
|
||||||
systemctl start gomft
|
systemctl start gomft
|
||||||
msg_ok "Started $APP"
|
msg_ok "Started $APP"
|
||||||
@ -62,4 +67,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
||||||
|
@ -20,7 +20,6 @@ $STD apt-get install -y \
|
|||||||
mc \
|
mc \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
rclone \
|
rclone \
|
||||||
build-essential \
|
|
||||||
tzdata \
|
tzdata \
|
||||||
ca-certificates
|
ca-certificates
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
@ -35,7 +34,7 @@ ln -sf /usr/local/go/bin/go /usr/local/bin/go
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
msg_ok "Setup Golang"
|
msg_ok "Setup Golang"
|
||||||
|
|
||||||
msg_info "Setup {APPLICATION}"
|
msg_info "Setup ${APPLICATION}"
|
||||||
temp_file2=$(mktemp)
|
temp_file2=$(mktemp)
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
wget -q "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file2
|
wget -q "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file2
|
||||||
@ -47,6 +46,28 @@ wget -q "https://github.com/StarFleetCPTN/GoMFT/releases/download/v${RELEASE}/go
|
|||||||
#$STD go mod download
|
#$STD go mod download
|
||||||
#$STD $HOME/go/bin/templ generate
|
#$STD $HOME/go/bin/templ generate
|
||||||
chmod +x gomft
|
chmod +x gomft
|
||||||
|
JWT_SECRET_KEY=$(openssl rand -base64 24 | tr -d '/+=')
|
||||||
|
|
||||||
|
cat <<EOF >/opt/gomft/.env
|
||||||
|
SERVER_ADDRESS=:8080
|
||||||
|
DATA_DIR=/opt/gomft/data/gomft
|
||||||
|
BACKUP_DIR=/opt/gomft/data/gomft/backups
|
||||||
|
JWT_SECRET=$JWT_SECRET_KEY
|
||||||
|
BASE_URL=http://localhost:8080
|
||||||
|
|
||||||
|
# Email configuration
|
||||||
|
EMAIL_ENABLED=false
|
||||||
|
EMAIL_HOST=smtp.example.com
|
||||||
|
EMAIL_PORT=587
|
||||||
|
EMAIL_FROM_EMAIL=gomft@example.com
|
||||||
|
EMAIL_FROM_NAME=GoMFT
|
||||||
|
EMAIL_REPLY_TO=
|
||||||
|
EMAIL_ENABLE_TLS=true
|
||||||
|
EMAIL_REQUIRE_AUTH=true
|
||||||
|
EMAIL_USERNAME=smtp_username
|
||||||
|
EMAIL_PASSWORD=smtp_password
|
||||||
|
EOF
|
||||||
|
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
msg_ok "Setup ${APPLICATION}"
|
msg_ok "Setup ${APPLICATION}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user