This shows you the differences between two versions of the page.
— |
address_book_auto_import [2016/06/14 16:35] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Address book auto import ===== | ||
+ | In this guide we will explain how to automatically import address book. | ||
+ | \\ The system will automatically import every day the "**AD_Collect.csv**" file. | ||
+ | "imp.sql" and "imp.sh" files needs to be places inside system **root** path. | ||
+ | |||
+ | :!: If you need to change the "AD_Collect.csv" file name, remember to change also the reference names inside "imp.sql" and "imp.sh" files. | ||
+ | |||
+ | :id1: The "imp.sql" file separator has already been set to the value: "**;**" | ||
+ | \\ | ||
+ | \\ | ||
+ | ==== #1: Instructions ==== | ||
+ | === 1) SQLite install === | ||
+ | <code> | ||
+ | apt-get install sqlite | ||
+ | </code> | ||
+ | when it prompts: | ||
+ | \\ "//After this operation, 4186 kB of additional disk space will be used. Do you want to continue [Y/n]? Y//" | ||
+ | |||
+ | Choose: | ||
+ | \\ "//always Y (yes)//" | ||
+ | |||
+ | === 2) ProFTPD install === | ||
+ | <code> | ||
+ | apt-get install proftpd | ||
+ | </code> | ||
+ | when asked: | ||
+ | \\ "//1. da inetd 2. autonomo//" | ||
+ | |||
+ | Choose: | ||
+ | \\ "//2 autonomo (standalone)//" | ||
+ | |||
+ | === 3) Add a FTP user to foxboxftp === | ||
+ | <code> | ||
+ | root@foxbox:/# useradd foxboxftp | ||
+ | root@foxbox:/# passwd foxboxftp | ||
+ | </code> | ||
+ | |||
+ | when it prompts: | ||
+ | \\ "//Enter new UNIX password://" | ||
+ | |||
+ | Prompt a new password. Retype the new password when requested. | ||
+ | If your password is successfully created, you will read: | ||
+ | \\ "//passwd: password updated successfully//" | ||
+ | |||
+ | === 4) Create home for the foxboxftp user === | ||
+ | <code> | ||
+ | root@foxbox:/# mkdir -p /home/foxboxftp | ||
+ | grant privileges | ||
+ | root@foxbox:/# chmod -R 0777 /home/foxboxftp | ||
+ | </code> | ||
+ | |||
+ | === 5) Put the 2 files attached in "/" folder of foxbox === | ||
+ | <code> | ||
+ | grant privileges | ||
+ | chmod -R 0777 imp.* | ||
+ | schedule command /imp.sh in your crontab for example each day 18:10 | ||
+ | </code> | ||
+ | |||
+ | === 6) Crontab launch === | ||
+ | So launch: | ||
+ | <code> | ||
+ | crontab -e | ||
+ | </code> | ||
+ | And add this line: | ||
+ | <code> | ||
+ | 10 18 * * * /imp.sh | ||
+ | </code> | ||
+ | |||
+ | === 7) Upload "AD_Collect.csv" === | ||
+ | Use FTP to upload a file with name "**AD_Collect.csv**" into "///home/foxboxftp//" folder. | ||
+ | \\ | ||
+ | \\ | ||
+ | ==== #2: Downloads ==== | ||
+ | Here you can download the required files. They are: | ||
+ | - **imp.sql**, available here: {{:file:imp_sql.zip|}} | ||
+ | - **imp.sh**, available here: {{:file:imp_sh.zip|}} |