File size: 875 Bytes
9b205e1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
#!/bin/bash
set -e
# Function for logging
log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*"
}
# Function for cleanup
cleanup() {
log "Performing File Browser installation cleanup..."
rm -rf /tmp/filebrowser*
}
# Trap to ensure cleanup on exit
trap cleanup EXIT
log "Starting File Browser installation..."
log "Downloading and installing File Browser..."
# Use the official installation script
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
log "Verifying File Browser installation..."
if command -v filebrowser >/dev/null 2>&1; then
FILEBROWSER_VERSION=$(filebrowser version 2>&1 | head -n1 || echo "Version check failed")
log "File Browser installed successfully: ${FILEBROWSER_VERSION}"
else
log "ERROR: File Browser installation failed"
exit 1
fi
log "File Browser installation completed successfully"
|