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:
sleep(10)
logging.warning("Trying again anyway (might not help, but hey...)")
+if __name__ == '__main__':
+ sys.exit(main())
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=""
]
)
],
+ entry_points={
+ "console_scripts": [
+ "vendserver = VendServer.VendServer:main"
+ ]
+ },
include_package_data=True,
install_requires=requirements,
license="BSD",