-
Notifications
You must be signed in to change notification settings - Fork 15
Home
Welcome to the scripts_NAS4Free wiki!
This wiki contains some additional information not contained in the README or in the RELEASE_NOTES file.
Before starting to read this wiki, please read the README file here: README
- Download the released version of the scripts here: tags
- It is recommanded NOT to download the latest status of the source code, but rather the released versions
- Please only use the stable version in a productive environment. It is recommanded NOT to use the beta versions and release candidates (rc) in a productive environment.
- Copy the zip (or tar.gz) archive in any folder of your NAS
- You can use any PERSISTENT folder of your NAS (I.e. in case you use the embedded version of NAS4Free, the folder should be located on one of your data disks)
- Unzip the archive
- Make sure that each respective script has the execute flags set
- Create a temporary folder
- this folder is used by the scripts to store some temporary file required during processing
- You can create the folder in any PERSISTENT folder of your NAS (In case you use the embedded version of NAS4Free, the folder should be located on one of your data disks)
- the easiest solution is to create a sub-folder called "tmp" in your script folder
- Create a log folder (You can create the folder in any PERSISTENT folder of your NAS)
- This folder will contain information, warning and error messages
- You can create the folder in any PERSISTENT folder of your NAS (In case you use the embedded version of NAS4Free, the folder should be located on one of your data disks)
- the easiest solution is to create a sub-folder called "log" in your script folder
- Update the config.sh file in order to:
- Specify the path to the log folder
- Specify the path to the tmp folder
- The email address used by the script to send notification
- The email address of the NAS administration that should receive the notification
# Mail configuration
################################################
CFG_MAIL_FROM="[email protected]" # Enter the mail address of the NAS here (should be the same address than in NAS GUI: System|Advanced|Email)
CFG_MAIL_TO="[email protected]" # Enter the email of the NAS administrator here
# Paths to log folder, temp folder...
#
# ATTENTION: THESE FOLDERS MUST EXIST !!!
# IF THEY DON'T, PLEASE CREATE THEM
################################################
CFG_TMP_FOLDER="./tmp" # Folder used to write temporary file
CFG_LOG_FOLDER="./log" # Folder containing all log files
Attention: Do not edit the file under windows with Notepad, Wordpad or similar tools, it would make the file unusable on NAS4Free as these software use other conventions for line breaks.
To allow the script to send notification emails to the NAS administrator, you need to configure NAS4Free so that it can send emails using the address specified in the previous section.
Therefore fill in the fields in the following section of the NAS4Free web interface: System|Advanced|Email
Before setting up the periodic tasks, I recommand to run the script at least once from the command line to check that everything works fine.
This section provides hints to setup checkTemp.sh, checkSpace.sh, checkPools.sh, scrubPools.sh, manageSnapshots.sh, backupData.sh
That's all. Enjoy the scripts!