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