Skip to content

Conversation

@wanetty
Copy link

@wanetty wanetty commented Oct 31, 2025

  • Add Upgopher LXC container creation script
  • Add installation script for Upgopher v1.11.1
  • Add JSON metadata with configuration details
  • Upgopher is a lightweight file upload/download server written in Go

Scripts wich are clearly AI generated and not further revied by the Author of this PR (in terms of Coding Standards and Script Layout) may be closed without review.

✍️ Description

Adds Upgopher, a lightweight file upload/download server written in Go. Includes LXC container creation script, installation script, and web interface metadata. Default configuration runs HTTP server on port 9090 without authentication (customizable via systemd service file).

🔗 Related PR / Issue

Link: N/A (New script submission for testing)

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)
  • No hardcoded credentials

📋 Additional Information (optional)

Source Project: https://github.com/wanetty/upgopher

Testing Results:

  • ✅ Container creation successful (Debian 12, 1 CPU, 512MB RAM, 4GB disk)
  • ✅ Service starts automatically on boot via systemd
  • ✅ Web interface accessible on http://"container-ip":9090
  • ✅ File upload/download functionality verified
  • ✅ Update script successfully downloads latest releases from GitHub

Customization: Users can edit /etc/systemd/system/upgopher.service to configure authentication, HTTPS/TLS, port, and upload directory as detailed in the JSON notes.

- Add Upgopher LXC container creation script
- Add installation script for Upgopher v1.11.1
- Add JSON metadata with configuration details
- Upgopher is a lightweight file upload/download server written in Go
Copy link
Member

@MickLesk MickLesk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can fully replaced with our build in function

fetch_and_deploy_gh_release "upgopher" "wanetty/upgopher" "prebuild" "latest" "/opt/upgopher" "upgopher_.*_linux_amd64.tar.gz"

ct/upgopher.sh Outdated
var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it against deb 13
apt-get --> apt
use deb822 format for apt lists

ct/upgopher.sh Outdated
msg_ok "Stopped Services"

cd /opt/upgopher
RELEASE_URL=$(curl -s https://api.github.com/repos/wanetty/upgopher/releases/latest | grep "browser_download_url.*linux_amd64.tar.gz" | cut -d '"' -f 4)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ram": 512,
"hdd": 4,
"os": "Debian",
"version": "12"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13

Comment on lines 16 to 18
msg_info "Installing Dependencies"
$STD apt-get install -y curl wget
msg_ok "Installed Dependencies"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove, already in core deps

Comment on lines 21 to 29
mkdir -p /opt/upgopher
cd /opt/upgopher
RELEASE_URL=$(curl -s https://api.github.com/repos/wanetty/upgopher/releases/latest | grep "browser_download_url.*linux_amd64.tar.gz" | cut -d '"' -f 4)
wget -q "$RELEASE_URL"
tar -xzf upgopher_*_linux_amd64.tar.gz
mv upgopher_*_linux_amd64/* .
rmdir upgopher_*_linux_amd64
rm -f upgopher_*_linux_amd64.tar.gz
chmod +x upgopher
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use fetch and deploy func as above

Comment on lines 33 to 34
# Use default configuration (no authentication, HTTP, default port/directory)
# Users can modify /etc/systemd/system/upgopher.service after installation to enable features
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comments

Comment on lines 65 to 66
$STD apt-get -y autoremove
$STD apt-get -y autoclean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add apt clean -y

Comment on lines 16 to 18
msg_info "Installing Dependencies"
$STD apt-get install -y curl wget
msg_ok "Installed Dependencies"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed, are core deps

ct/upgopher.sh Outdated
var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump 13

ct/upgopher.sh Outdated
Comment on lines 36 to 42
cd /opt/upgopher
RELEASE_URL=$(curl -s https://api.github.com/repos/wanetty/upgopher/releases/latest | grep "browser_download_url.*linux_amd64.tar.gz" | cut -d '"' -f 4)
wget -q "$RELEASE_URL"
tar -xzf upgopher_*_linux_amd64.tar.gz
mv upgopher_*_linux_amd64/* .
rmdir upgopher_*_linux_amd64
rm -f upgopher_*_linux_amd64.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetch_and_deploy_gh_release "upgopher" "wanetty/upgopher" "prebuild" "latest" "/opt/upgopher" "upgopher_.*_linux_amd64.tar.gz"

ct/upgopher.sh Outdated
msg_info "Starting Services"
systemctl start upgopher
msg_ok "Started Services"
msg_ok "Updated Successfully"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated successfully!

"ram": 512,
"hdd": 4,
"os": "Debian",
"version": "12"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13

Comment on lines 20 to 30
msg_info "Installing Upgopher"
mkdir -p /opt/upgopher
cd /opt/upgopher
RELEASE_URL=$(curl -s https://api.github.com/repos/wanetty/upgopher/releases/latest | grep "browser_download_url.*linux_amd64.tar.gz" | cut -d '"' -f 4)
wget -q "$RELEASE_URL"
tar -xzf upgopher_*_linux_amd64.tar.gz
mv upgopher_*_linux_amd64/* .
rmdir upgopher_*_linux_amd64
rm -f upgopher_*_linux_amd64.tar.gz
chmod +x upgopher
msg_ok "Installed Upgopher"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetch_and_deploy_gh_release "upgopher" "wanetty/upgopher" "prebuild" "latest" "/opt/upgopher" "upgopher_.*_linux_amd64.tar.gz"
chmod +x /opt/upgopher/upgopher

- Update Debian version from 12 to 13
- Replace manual download/extraction with fetch_and_deploy_gh_release function
- Remove redundant curl/wget installation (already in core dependencies)
- Remove unnecessary comments
- Add apt clean -y to cleanup section
- Modernize apt-get commands to apt
- Update success message to 'Updated successfully!'
- Fix asset pattern to match release files (upgopher_*_linux_amd64.tar.gz)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants