wtf lockfile
This commit is contained in:
parent
d8f40806e1
commit
e2997d951a
22
app/vendors/shells/vault.php
vendored
22
app/vendors/shells/vault.php
vendored
|
|
@ -22,32 +22,20 @@ class VaultShell extends Shell {
|
|||
/******************************************************
|
||||
* Config Variables
|
||||
* *****************************************************/
|
||||
$testing = 0; //Whether to actually move the emails. 1=test, 0=production
|
||||
|
||||
if($testing == 1) {
|
||||
$ripmime_path = '/opt/local/bin/ripmime';
|
||||
$email_dir = '/Users/karlcordes/Sites/quotenik/app/emails';
|
||||
$vault_dir = '/Users/karlcordes/Sites/quotenik/app/vaultmsgs';
|
||||
$processed_dir = '/Users/karlcordes/Sites/quotenik/app/processed_vaultmsgs';
|
||||
$lockfile = '/Users/karlcordes/Sites/quotenik/app/vault.lock';
|
||||
}
|
||||
else { //Production
|
||||
|
||||
$ripmime_path = '/usr/local/bin/ripmime';
|
||||
$email_dir = '/var/www/emails';
|
||||
$vault_dir = '/var/www/vaultmsgs/new';
|
||||
$processed_dir = '/var/www/vaultmsgs/cur';
|
||||
$lockfile = '/var/www/CMC-Sales/app/vault.lock';
|
||||
}
|
||||
|
||||
if(file_exists($lockfile)) {
|
||||
die("Error: Another process is currently running. Terminating this one");
|
||||
}
|
||||
else {
|
||||
if(!touch($lockfile)) {
|
||||
die("FATAL ERROR: Unable to create vault.lock");
|
||||
}
|
||||
}
|
||||
|
||||
if(!touch($lockfile)) {
|
||||
die("FATAL ERROR: Unable to create vault.lock");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Find the strings we want to look for in the subjects. Build arrays
|
||||
|
|
|
|||
Loading…
Reference in a new issue