running out of space on flash? link to cache instead?


Recommended Posts

Hi

 

I think that my flash drive is becoming full. As a linux newbie, what would be the syntax for booting from USB and then transferring the pkg installations etc from a hidden "." directory on the cache drive?.

Are there any gotchas? I would hate to lose my data!

cheers

Tony

 

 

My go script is:

 

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
/boot/unmenu/uu &
# determine if cache drive online, retry upto 7 times
for i in 0 1 2 3 4 5 6 7
do
    if [ ! -d /mnt/cache ]
    then
      sleep 10
    fi
done

/boot/cache_dirs -w -e "BIN" &
cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c 
cp --preserve=timestamps /boot/custom/etc/ssh/ssh*key* /etc/ssh
chmod 600 /etc/ssh/ssh*key*
/etc/rc.d/rc.sshd start
# install crashplan
tar -C / -xvf /boot/packages/crashplan.tar
/usr/local/crashplan/bin/CrashPlanEngine start


# If Cache drive is online, start SABNzbd
if [ -d /mnt/cache ]; then
  # Start SABnzbd and sickbeard
  installpkg /boot/custom/SABnzbdDependencies-1.3-i486-unRAID.tgz
  python /mnt/cache/.custom/sabnzbd/SABnzbd.py -d -s 192.168.1.22:88
  nohup python /mnt/cache/.custom/sickbeard/SickBeard.py &
fi

# setup delete of BIN files older than 1 or 2 days daily
crontab -l >/tmp/crontab
echo "# delete 2 day old files:" >>/tmp/crontab
echo "35 6 * * * root find /mnt/user/BIN -mtime +1 -print -exec rm -rf {} \;" >>/tmp/crontab
crontab /tmp/crontab

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.