projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
random nits for grandstream provisioning :UI, docs, java path, s/system/IPC::Run...
[freeside.git]
/
FS
/
FS
/
Daemon.pm
diff --git
a/FS/FS/Daemon.pm
b/FS/FS/Daemon.pm
index
7e0d45c
..
ca18134
100644
(file)
--- a/
FS/FS/Daemon.pm
+++ b/
FS/FS/Daemon.pm
@@
-12,7
+12,10
@@
use Date::Format;
#avoid duplicate code. eventually this should use something from CPAN.
@ISA = qw(Exporter);
#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';
$pid_dir = '/var/run';
@@
-74,6
+77,11
@@
sub sigterm { $sigterm; }
sub logfile { $logfile = shift; } #_logmsg('test'); }
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;
sub _die {
my $msg = shift;
unlink $pid_file if -e $pid_file;