Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
agent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
7
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
299a8d60
authored
Aug 12, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add pyinstaller support
parent
f6d38d37
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletions
+22
-1
agent-winservice.py
+22
-1
No files found.
agent-winservice.py
View file @
299a8d60
...
...
@@ -45,5 +45,26 @@ class AppServerSvc (win32serviceutil.ServiceFramework):
agent_main
()
if
__name__
==
'__main__'
:
def
main
():
if
len
(
sys
.
argv
)
==
1
:
# service must be starting...
# for the sake of debugging etc, we use win32traceutil to see
# any unhandled exceptions and print statements.
import
win32traceutil
# noqa
logger
.
info
(
"service is starting..."
)
servicemanager
.
Initialize
()
servicemanager
.
PrepareToHostSingle
(
AppServerSvc
)
# Now ask the service manager to fire things up for us...
servicemanager
.
StartServiceCtrlDispatcher
()
logger
.
info
(
"service done!"
)
else
:
win32serviceutil
.
HandleCommandLine
(
AppServerSvc
)
if
__name__
==
'__main__'
:
try
:
main
()
except
(
SystemExit
,
KeyboardInterrupt
):
raise
except
:
logger
.
exception
(
"Exception:"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment