Commit fc542240 authored by Mark Tearle's avatar Mark Tearle
Browse files

Add entrypoint to setup.py for vendserver

parent 2a6c4f6e
......@@ -1186,7 +1186,8 @@ def do_vend_server(options, config_opts):
logging.info("Trying again in 5 seconds.")
sleep(5)
if __name__ == '__main__':
def main(argv=None):
options, config_opts = set_stuff_up()
while True:
try:
......@@ -1216,3 +1217,5 @@ if __name__ == '__main__':
sleep(10)
logging.warning("Trying again anyway (might not help, but hey...)")
if __name__ == '__main__':
sys.exit(main())
......@@ -14,7 +14,7 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games
DESC="VendServer"
NAME=vendserver
DAEMON="/usr/local/uccvend-vendserver/VendServer/VendServer.py"
DAEMON="/usr/local/uccvend-vendserver/vendserver"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
DAEMON_ARGS=""
......
......@@ -40,6 +40,11 @@ setup(
]
)
],
entry_points={
"console_scripts": [
"vendserver = VendServer.VendServer:main"
]
},
include_package_data=True,
install_requires=requirements,
license="BSD",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment