Вы находитесь на странице: 1из 2

VAS Vox Move Script (vas_voxmv.

sh)

Purpose
This shell script replaces ftp_vox1.sh. It archives the vox files to a VAS, then updates the
rec_playint table on the host and sets the f_path and device_name to the new location. It
also has a cleanup routine that deletes the vox files on the VAS depending on number of
days old that was set. The shell should be setup in cron to run @ 12:30am daily.

Process Flow
The script will first update rec_playint.filler1 with the actual vox filename
(office_no+file_num+appl) where filler1 is blank. It will then do the clean-up routine
(vox files over $daysdel) and delete the vox files on the VAS to clear up space. On each
vox file deletion, it updates rec_playint.f_path=’deleted’ on the host task database.
Then it generates a list of vox files and starts FTP’ing each of files to the VAS. After a
file gets FTPed, it will get the byte size on the VAS and compare it with the original vox
file, if the size match it can then permanently delete the file off the dialer. After deleting
the file, it will update rec_playint table on the host and set the f_path and device_name
to the VAS folder and hostname.

Location
Server : linuxprod
Environnent : dcm4.3.7
Shell script : vas_voxmv.sh

How to set it up?


- vi vas_voxmv.sh modify the variables below

noblehost=amdial #_noble hostname or IP


vasserver=10.10.2.157 #_vas hostname or IP

vasdest=/noblerecord #_vas destination folder


voxsrc=/archive #_ddp source folder
daysdel=-1 #_negative 1 means its disabled
mainddp=amdialddp #_used if there's more than 1 ddp

vasusr=voxmove #_vas login name


vaspwd=movevox #_vas password

fdays="-mtime +0" #_leaves 1 days worth of voxfiles


- noble host - the hostname where the scheduler is running
- vas server - the hostname or ip of the VAS
- vas dest - the destination directory on the VAS
- days del - the number of days before deleting the vox files on the VAS,
negative 1 (-1) means its disabled.
- mainddp - if there’s more than one ddp, it should have only the first ddp
name.
- vas usr - ftp user name on the VAS server to login.
- vas pwd - ftp password of the vas usr to login to VAS.
- fdays - only moves vox files over “-mtime +X” days. X is always plus 1 day,
so if you put zero, its 1 day worth of vox files are left. If you want to remove
all the voxfiles when the script runs, just do fdays=””.
- now that you have modified the variables, copy the vas_voxmv.sh on all the
dialers on /usr/local/bin directory.
- set up a cron entry to run it daily @ 12:30 am
- make sure you disable the cron entry for ftp_vox1.sh

Вам также может понравиться