Skip to content

Commit

Permalink
Update tusd-install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kodxana authored Feb 18, 2024
1 parent b97d493 commit e141857
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/tusd-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# Define where to save the tusd binary
TUSD_BIN_PATH="/usr/local/bin/tusd"

# Define the directory for hooks
HOOKS_DIR="/etc/tusd/hooks"

# Create the hooks directory
mkdir -p "${HOOKS_DIR}"

# Download the tusd tar.gz file
echo "Downloading tusd..."
curl -L https://github.com/tus/tusd/releases/download/v2.2.2/tusd_linux_amd64.tar.gz -o tusd.tar.gz
Expand All @@ -18,7 +24,18 @@ mv tusd_linux_amd64/tusd "${TUSD_BIN_PATH}"
# Make tusd executable
chmod +x "${TUSD_BIN_PATH}"

# Download hook scripts
echo "Downloading hook scripts..."
curl -L https://github.com/kodxana/RunPod-FilleUploader/raw/main/hook/post-finish -o "${HOOKS_DIR}/post-finish"
curl -L https://github.com/kodxana/RunPod-FilleUploader/raw/main/hook/rename_uploaded_file.py -o "${HOOKS_DIR}/rename_uploaded_file.py"

# Make the hook scripts executable
echo "Setting up hook scripts..."
chmod +x "${HOOKS_DIR}/post-finish"
chmod +x "${HOOKS_DIR}/rename_uploaded_file.py"

# Clean up downloaded and extracted files
rm -rf tusd.tar.gz tusd_linux_amd64

echo "tusd setup completed. tusd is now available at ${TUSD_BIN_PATH}"
echo "Hook scripts are set up at ${HOOKS_DIR}"

0 comments on commit e141857

Please sign in to comment.