source: box/trunk/bin/bbackupd/bbackupd.cpp @ 2884

Revision 2884, 1.1 KB checked in by chris, 14 months ago (diff)

Fix abort if the local data directory doesn't exist.

  • Property svn:eol-style set to native
Line 
1// --------------------------------------------------------------------------
2//
3// File
4//              Name:    bbackupd.cpp
5//              Purpose: main file for backup daemon
6//              Created: 2003/10/11
7//
8// --------------------------------------------------------------------------
9
10#include "Box.h"
11#include "BackupDaemon.h"
12#include "MainHelper.h"
13#include "BoxPortsAndFiles.h"
14#include "BackupStoreException.h"
15#include "Logging.h"
16
17#include "MemLeakFindOn.h"
18
19#ifdef WIN32
20        #include "Win32ServiceFunctions.h"
21        #include "Win32BackupService.h"
22
23        extern Win32BackupService* gpDaemonService;
24#endif
25
26int main(int argc, const char *argv[])
27{
28        int ExitCode = 0;
29
30        MAINHELPER_START
31
32        Logging::SetProgramName("bbackupd");
33        Logging::ToConsole(true);
34        Logging::ToSyslog (true);
35       
36#ifdef WIN32
37
38        EnableBackupRights();
39
40        gpDaemonService = new Win32BackupService();
41        ExitCode = gpDaemonService->Daemon::Main(
42                BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE,
43                argc, argv);
44        delete gpDaemonService;
45
46#else // !WIN32
47
48        BackupDaemon daemon;
49        ExitCode = daemon.Main(BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE,
50                argc, argv);
51
52#endif // WIN32
53
54        MAINHELPER_END
55
56        return ExitCode;
57}
Note: See TracBrowser for help on using the repository browser.