aboutsummaryrefslogtreecommitdiffhomepage
path: root/bazarr.py
diff options
context:
space:
mode:
authorLouis Vézina <[email protected]>2018-10-16 21:15:42 -0400
committerLouis Vézina <[email protected]>2018-10-16 21:15:42 -0400
commite124e1c3fd90052b0f2a069ca5f776418b4ac68d (patch)
tree2ede4032349c6a81b068525ab2cbeef98a101601 /bazarr.py
parent7186fc8968cc3b47a1a810e346f81acb0a46b851 (diff)
downloadbazarr-e124e1c3fd90052b0f2a069ca5f776418b4ac68d.tar.gz
bazarr-e124e1c3fd90052b0f2a069ca5f776418b4ac68d.zip
Fix to create daemon stop and restart file in config_dir. Add a fix for automatic reloading after restart when using a reverse proxy with SSL.
Diffstat (limited to 'bazarr.py')
-rw-r--r--bazarr.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/bazarr.py b/bazarr.py
index 06c39ead2..44511a4b1 100644
--- a/bazarr.py
+++ b/bazarr.py
@@ -5,6 +5,9 @@ import os
import sys
import getopt
+config_dir = os.path.join(os.path.dirname(__file__), 'data/')
+no_update = False
+
arguments = []
try:
opts, args = getopt.getopt(sys.argv[1:],"h:",["no-update", "config="])
@@ -13,7 +16,14 @@ except getopt.GetoptError:
sys.exit(2)
for opt, arg in opts:
arguments.append(opt)
- if arg != '':
+ if opt == '-h':
+ print 'bazarr.py -h --no-update --config <config_directory>'
+ sys.exit()
+ elif opt in ("--no-update"):
+ no_update = True
+ elif opt in ("--config"):
+ config_dir = arg
+ elif arg != '':
arguments.append(arg)
@@ -32,8 +42,8 @@ def start_bazarr():
if __name__ == '__main__':
- restartfile = os.path.normcase(os.path.join(globals()['dir_name'], 'bazarr.restart'))
- stopfile = os.path.normcase(os.path.join(globals()['dir_name'], 'bazarr.stop'))
+ restartfile = os.path.normcase(os.path.join(config_dir, 'bazarr.restart'))
+ stopfile = os.path.normcase(os.path.join(config_dir, 'bazarr.stop'))
try:
os.remove(restartfile)