Build your own Home Cloud Server file management system
Follow the instructions:
- Print current partition information:
lsblk
- Attach your first new drive to the HCS host machine
- Re-print current partition information:
lsblk
- Find the new drive location (e.g., /dev/sda1)
- Partition the new drive
fdisk /dev/sda1
- Enter
p
to create a new partition - Press the enter key to accept each of the default values presented
- Enter
w
to save the partition
- Enter
- Format the new partition, enter
mkfs.ext4 -L tray1 /dev/sda1
vim etc/fstab
- Append
LABEL=TRAY1 /tray1 ext4 defaults 0 2
to the file - Check mounted paritions (enter
mount
) ... you should NOT see tray1 yet - Mount the new drive, enter
mount -a
- Check mounted partitions (enter
mount
) ... you SHOULD see tray1 now - Confirm your new drive space, enter
lsblk
- Repeat for subsequent drives.
Follow the instructions:
- Configure SSMTP on your HCS host machine. SSMTP configuration management located at
cd ~/../../etc/ssmtp/ssmtp.config
. You can paste the example ssmtp.config below. - Update each .sh script in the hcs/jobs directory with your preferred To and From email addresses.
cd
into the hcs/jobs directory and runsudo bash relocateHCSjobs.sh
cd
into /etc/cron.daily runcrontab -e
and append the following
0 0 * * * /etc/cron.daily/backupUse.sh
0 0 * * * /etc/cron.daily/diskSpaceInfoCheck.sh
0 0 * * * /etc/cron.daily/trayOneUse.sh
0 0 * * * /etc/cron.daily/trayTwoUse.sh
0 0 * * * /etc/cron.daily/trayThreeUse.sh
0 0 * * * /etc/cron.daily/trayFourUse.sh
7.Hit the ESC key and type :wq
8.cd
into /etc/cron.weekly run crontab -e
and append the following
0 0 * * * /etc/cron.weekly/mvTrayFourToBackup.sh
0 0 * * * /etc/cron.weekly/mvTrayOneToTrayTwo.sh
0 0 * * * /etc/cron.weekly/mvTrayTwoToTrayThree.sh
7.Hit the ESC key and type :wq
8.cd
into /etc/cron.monthly run crontab -e
and append the following
0 0 * * * /etc/cron.weekly/mvTrayThreeToTrayFour.sh
# ssmtp.config:
root=<YOUR EMAIL ADDRESS>
mailhub=smtp.gmail.com:587
rewriteDomain=gmail.com
AuthUser=<YOUR EMAIL ADDRESS>
AuthPass=<YOUR PASSWORD>
FromLineOverride=YES
UseStartTLS=YES
UeTLS=YES
Follow the instructions:
- Navigate to hcs/config directory.
- Give the "hcsName" property a new value.
- Grant IPs access to your HCS by updating the "whitelist" property.
#!/bin/sh
git clone https://github.com/mgeatz/AEM-Weather-App git clone https://github.com/mgeatz/Alexa-Blue-Jean-Skill git clone https://github.com/mgeatz/hcs.git git clone https://github.com/mgeatz/Java-API.git git clone https://github.com/mgeatz/java-blockchain.git git clone https://github.com/mgeatz/LemurCode.git git clone https://github.com/mgeatz/michaelgeatz.git git clone https://github.com/mgeatz/phonegap-app-developer.git git clone https://github.com/mgeatz/RESTUP.git git clone https://github.com/mgeatz/skolvikes.git git clone https://github.com/mgeatz/up.git