diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-10-17 12:55:05 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-10-17 12:55:05 +0000 |
commit | c16cf90559fad4d8382f3cd3f92ca78f35ed2095 (patch) | |
tree | af01021204c8fa46986388f1fde6721dca1a7728 /bin/bbackupd/BackupDaemon.cpp | |
parent | 7239aaba320fbc24dd608585ca417f804dab1950 (diff) |
Use the specified service name when installing and removing the service.
Pass the service name on the service command line, and use it for event
log messages.
(merges [1856])
Diffstat (limited to 'bin/bbackupd/BackupDaemon.cpp')
-rw-r--r-- | bin/bbackupd/BackupDaemon.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp index aaae003d..04502427 100644 --- a/bin/bbackupd/BackupDaemon.cpp +++ b/bin/bbackupd/BackupDaemon.cpp @@ -128,7 +128,8 @@ BackupDaemon::BackupDaemon() #ifdef WIN32 , mInstallService(false), mRemoveService(false), - mRunAsService(false) + mRunAsService(false), + mServiceName("bbackupd") #endif { // Only ever one instance of a daemon @@ -347,14 +348,16 @@ int BackupDaemon::Main(const std::string &rConfigFileName) { if (mInstallService) { - return InstallService(rConfigFileName.c_str()); + return InstallService(rConfigFileName.c_str(), mServiceName); } if (mRemoveService) { - return RemoveService(); + return RemoveService(mServiceName); } + Logging::SetProgramName("Box Backup (" + mServiceName + ")"); + int returnCode; if (mRunAsService) |