communigate provisioning phase 2: add svc_domain.trailer -> communigate TrailerText...
[freeside.git] / FS / FS / Daemon.pm
index 7e0d45c..ca18134 100644 (file)
@@ -12,7 +12,10 @@ use Date::Format;
 #avoid duplicate code.  eventually this should use something from CPAN.
 
 @ISA = qw(Exporter);
-@EXPORT_OK = qw( daemonize1 drop_root daemonize2 sigint sigterm logfile );
+@EXPORT_OK = qw(
+  daemonize1 drop_root daemonize2 myexit logfile sigint sigterm
+);
+%EXPORT_TAGS = ( 'all' => [ @EXPORT_OK ] );
 
 $pid_dir = '/var/run';
 
@@ -74,6 +77,11 @@ sub sigterm { $sigterm; }
 
 sub logfile { $logfile = shift; } #_logmsg('test'); }
 
+sub myexit {
+  unlink $pid_file if -e $pid_file;
+  exit;  
+}
+
 sub _die {
   my $msg = shift;
   unlink $pid_file if -e $pid_file;