Files
Sharpbin/PasteBin/install.sh
T
whoswhip eb21e6d662 Pretty big update, this adds file compression on the server side to preserve space on the disk.
Switched the paste info displaying from server side to client side, which also added a new api to fetch the info.
A new api to check if the user is authorized, (/api/accounts/authenticated)

## Commit Message Details Below Generated by Copilot
Add compression, and install script

Added EncryptByteArray and DecryptByteArray methods to the Encryption class for handling byte array encryption and decryption.
Removed unused namespaces from Program.cs.
Replaced direct file content reading and HTML manipulation with database queries and JSON responses for better error handling and response consistency.
Added JSON error responses for various error conditions.
Implemented content compression and decompression using GZip in Compression.cs to reduce file size and improve performance.
Updated paste creation and retrieval logic to handle compressed and encrypted content.
Added new API endpoints for fetching paste information and checking user authentication status.
Modified HTML templates to dynamically fetch and display paste information and user authentication status using JavaScript.
Added Paste UID property to the Paste class to store unique identifiers for pastes.
Created a new Compression class to handle string compression and decompression using GZip.
Updated the InitializeAsync method to create the pastes.sqlite file if it does not exist.
Enhanced the user interface to show or hide elements based on user authentication status and paste ownership (client side).
Improved error handling and user feedback in the JavaScript code.
Added logic to handle compressed and encrypted content in various parts of the application.
Added a new Bash script (install.sh) to install Sharpbin on a Linux system, which includes fetching the latest release, extracting it, and configuring Cloudflare keys.
2024-10-18 20:12:48 -04:00

23 lines
840 B
Bash

#!/bin/bash
############################################
#### Sharpbin Linux installer ####
############################################
##
## This is a semi completed script to install Sharpbin on Linux, however it does not set it as a system daemon/service, cause idk how to do that lol
##
sudo mkdir -p /usr/local/bin/Sharpbin
cd /usr/local/bin/Sharpbin
curl -s "https://api.github.com/repos/whoswhip/Sharpbin/releases/latest" | jq -r '.assets[] | select(.name | test("sharpbin-linux.tar$")) | .browser_download_url' | xargs -I {} curl -L -o sharpbin-linux.tar {}
tar -xvf sharpbin-linux.tar
chmod +x Sharpbin
echo "Enter your cloudflare sitekey: "
read sitekey
echo "Enter your cloudflare secretkey: "
read secretkey
echo "{ \"CF_TurnstileSiteKey\": \"$sitekey\", \"CF_TurnstileSecret\": \"$secretkey\" }" > config.json