redirecting issues

Posted by junnot 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
redirecting issues
December 21, 2017 02:51PM
sudo cp -v /opt/piratebox/www/redirect.html /opt/piratebox/www/index.html.

I used to link codes above before enabling my usb storage, ever since it keeps redirecting it to hostname.com/content and doesn't show anything


2. I have challenges with using another flash on my pi thanks
Re: redirecting issues
December 21, 2017 08:24PM
For the first issue, please post the output of the following commands:
ls -l /opt/piratebox/www/content
ls -l /opt/piratebox/www
This issue can be a side effect of your trouble using another USB stick.

The second issue with the different USB stick is based how we link the Pi together with the USB stick. The USB stick is referred using its UUID. .
You need to login via SSH, find out the old and new UUID and exchange it. Keep the new USB stick in the Pi while processing the commands.

OLD_UUID=$( grep /mnt/usbshare | cut -d ' ' -f 1 ) 
UUIDS=$(blkid | grep "/dev/sd*.*TYPE=\"vfat\"" | egrep -o " UUID=\"([a-zA-Z0-9-])*\"" | sed 's/ //g')
NEW_UUID=$(echo "${UUIDS}" | cut -f2 -d" " | sed s/"\""/""/g)

echo "Changing UUID from ${OLD_UUID} to ${NEW_UUID} "
sudo sed -i -e "s|${OLD_UUID}|${NEW_UUID}|" /etc/fstab

best regards
Matthias