Make sigterm listen optional (fixes macOS problem)
This commit is contained in:
parent
952a1a1da8
commit
c92c840c41
1 changed files with 4 additions and 2 deletions
|
@ -12,8 +12,10 @@ def main():
|
|||
main = None
|
||||
try:
|
||||
import signal
|
||||
|
||||
try:
|
||||
signal.signal(signal.SIGTERM, lambda signum, stack_frame: sys.exit(0))
|
||||
except Exception as err:
|
||||
print("Error setting up SIGTERM watcher: %s" % err)
|
||||
|
||||
app_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
os.chdir(app_dir) # Change working dir to zeronet.py dir
|
||||
|
|
Loading…
Reference in a new issue