Got ankiserverctl.py working on my system, installing into the system bin/ and working with config files in another directory.
Conflicts: setup.py
This commit is contained in:
parent
a18d806b06
commit
33c0fdcd1f
@ -1,4 +1,4 @@
|
||||
#! /usr/bin/env python2
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
@ -29,6 +29,13 @@ def startsrv(configpath):
|
||||
if not configpath:
|
||||
configpath = SERVERCONFIG
|
||||
|
||||
# We change to the directory containing the config file
|
||||
# so that all the paths will be relative to it.
|
||||
configdir = os.path.dirname(configpath)
|
||||
if configdir != '':
|
||||
os.chdir(configdir)
|
||||
configpath = os.path.basename(configpath)
|
||||
|
||||
devnull = open(os.devnull, "w")
|
||||
|
||||
pid = subprocess.Popen( "ankisyncd",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user