script and new cron method
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
## Gen PC Sidecar Script
|
||||
The files are stored typically inside of `/var/lib/asterisk/PC-Contact-Sync` and the scripts should be run every 6 hours by a cron job.
|
||||
The files are stored typically inside of `/var/lib/asterisk/PC-Contact-Sync` and the scripts should be run every 6 hours or so by a cron job.
|
||||
|
||||
Make sure that all files are owned by asterisk user including the output files and the cronjob.
|
||||
|
||||
<br>
|
||||
|
||||
## Quickstart
|
||||
#### Install
|
||||
Download this repo
|
||||
```
|
||||
git clone https://git.archfox.org/poslop/PC-Contact-Sync
|
||||
```
|
||||
Run the install script as Root
|
||||
```
|
||||
./install.sh
|
||||
```
|
||||
|
||||
#### Config Fields
|
||||
`config.json` has several fields. The config file needs to be next to the script in order to be read.
|
||||
|
||||
@@ -34,24 +44,6 @@ prepend_extensions
|
||||
5. Add extra contacts you want added to the phones in `prepend_extensions`.
|
||||
<br>
|
||||
|
||||
#### Cronjob Example
|
||||
Create the cronjob as asterisk user.
|
||||
|
||||
```
|
||||
EDITOR=vim crontab -e -u asterisk
|
||||
```
|
||||
|
||||
Append this to the crontab
|
||||
|
||||
```
|
||||
# Run Polycom directory sync every 4 hours at :00
|
||||
0 */4 * * * /usr/bin/php /var/lib/asterisk/PC-Contact-Sync/directory.php --notify >> /var/log/directory.log 2>&1
|
||||
|
||||
# Run PC sidecar sync every 4 hours at :05 (5 mins after)
|
||||
5 */4 * * * /usr/bin/php /var/lib/asterisk/PC-Contact-Sync/sidecar.php >> /var/log/sidecar.log 2>&1
|
||||
```
|
||||
<br>
|
||||
|
||||
## Process Walkthrough
|
||||
|
||||
#### 1. Pull Contact List
|
||||
|
||||
Reference in New Issue
Block a user