HINSTANCE hAppInstance;
const char *szAppName = "Bacula";
DWORD mainthreadId;
+bool silent = false;
/* Imported variables */
extern DWORD g_servicethread;
char *szCmdLine = CmdLine;
char *wordPtr, *tempPtr;
int i, quote;
- bool silent = false;
/* Save the application instance and main thread id */
hAppInstance = hInstance;
/* /install */
if (strncmp(&szCmdLine[i], BaculaInstallService, strlen(BaculaInstallService)) == 0) {
/* Install Bacula as a service */
- bacService::InstallService(silent);
+ bacService::InstallService();
i += strlen(BaculaInstallService);
continue;
}
/* /remove */
if (strncmp(&szCmdLine[i], BaculaRemoveService, strlen(BaculaRemoveService)) == 0) {
/* Remove the Bacula service */
- bacService::RemoveService(silent);
+ bacService::RemoveService();
i += strlen(BaculaRemoveService);
continue;
}
bacService init;
extern DWORD g_platform_id;
+extern bool silent;
bacService::bacService()
{
// SERVICE INSTALL ROUTINE
int
-bacService::InstallService(bool silent)
+bacService::InstallService()
{
const int pathlength = 2048;
char path[pathlength];
// SERVICE REMOVE ROUTINE
int
-bacService::RemoveService(bool silent)
+bacService::RemoveService()
{
// How to remove the Bacula service depends upon the OS
switch (g_platform_id) {
// Routine called by WinMain to cause Bacula to be installed
// as a service.
- int BaculaServiceMain();
+ static int BaculaServiceMain();
// Routine to install the Apcupsd service on the local machine
- int InstallService(bool silent);
+ static int InstallService();
// Routine to remove the Apcupsd service from the local machine
- int RemoveService(bool silent);
+ static int RemoveService();
// SERVICE SUPPORT FUNCTIONS
* license please contact Landon Fuller <landonf@opendarwin.org>.
*/
/*
- Copyright (C) 2005 Kern Sibbald
+ Copyright (C) 2005-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
* license please contact Landon Fuller <landonf@opendarwin.org>.
*/
/*
- Copyright (C) 2005 Kern Sibbald
+ Copyright (C) 2005-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
* Landon Fuller <landonf@threerings.net>.
*/
/*
- Copyright (C) 2005 Kern Sibbald
+ Copyright (C) 2005-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License