forked from ONLYOFFICE/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/ZCS-10534 : Scripts to install rabbitmq, start and stop docse…
…rvice/spellchecker/coverter; https for docservice; change in connection limit; mysql as db
- Loading branch information
1 parent
279f651
commit df31f2d
Showing
19 changed files
with
794 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"appenders": { | ||
"default": { | ||
"type": "file", | ||
"filename": "../onlyoffice.log", | ||
"layout": { | ||
"type": "pattern", | ||
"pattern": "[%d] [%p] %c - %.10000m" | ||
} | ||
} | ||
}, | ||
"categories": { | ||
"default": { "appenders": [ "default" ], "level": "WARN" } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"log": { | ||
"filePath": "../documentserver/server/Common/config/log4js/logconfig.json" | ||
}, | ||
"storage": { | ||
"fs": { | ||
"folderPath": "../documentserver/App_Data/cache/files" | ||
} | ||
}, | ||
"services": { | ||
"CoAuthoring": { | ||
"server": { | ||
"static_content": { | ||
"/fonts": { | ||
"path": "../documentserver/fonts", | ||
"options": {"maxAge": "7d"} | ||
}, | ||
"/sdkjs": { | ||
"path": "../documentserver/sdkjs", | ||
"options": {"maxAge": "7d"} | ||
}, | ||
"/web-apps": { | ||
"path": "../documentserver/web-apps", | ||
"options": {"maxAge": "7d"} | ||
}, | ||
"/sdkjs-plugins": { | ||
"path": "../documentserver/sdkjs-plugins", | ||
"options": {"maxAge": "7d"} | ||
}, | ||
"/App_Data": { | ||
"path": "../documentserver/App_Data", | ||
"options": {"maxAge": "7d"} | ||
} | ||
} | ||
}, | ||
"utils": { | ||
"utils_common_fontdir": "/usr/share/fonts" | ||
}, | ||
"request-filtering-agent" : { | ||
"allowPrivateIPAddress": true, | ||
"allowMetaIPAddress": true | ||
}, | ||
"sockjs": { | ||
"sockjs_url": "../documentserver/web-apps/vendor/sockjs/sockjs.min.js" | ||
} | ||
} | ||
}, | ||
"license": { | ||
"license_file": "./../documentserver/license.lic", | ||
"warning_limit_percents": 70, | ||
"packageType": 0 | ||
}, | ||
"FileConverter": { | ||
"converter": { | ||
"fontDir": "/usr/share/fonts", | ||
"presentationThemesDir": "../documentserver/sdkjs/slide/themes", | ||
"x2tPath": "../documentserver/server/FileConverter/bin/x2t", | ||
"docbuilderPath": "../documentserver/server/FileConverter/bin/docbuilder", | ||
"docbuilderAllFontsPath": "../documentserver/App_Data/docbuilder/AllFonts.js" | ||
} | ||
}, | ||
"FileStorage": { | ||
"directory": "../documentserver/App_Data" | ||
}, | ||
"SpellChecker": { | ||
"server": { | ||
"dictDir": "../documentserver/server/SpellChecker/dictionaries" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import json | ||
import os.path | ||
import os | ||
import sys | ||
|
||
def check_services_running(): | ||
with open(processid_file_path, "r") as f: | ||
data = json.load(f) | ||
|
||
if(data["docservice"] > 0 and check_pid(data["docservice"])): | ||
sys.exit("Error : docservice running with pid (" + str(data["docservice"]) + ") ") | ||
if(data["spellchecker"] > 0 and check_pid(data["spellchecker"])): | ||
sys.exit("Error : spellchecker running with pid (" + str(data["spellchecker"]) + ") ") | ||
if(data["converter"] > 0 and check_pid(data["converter"])): | ||
sys.exit("Error : converter running with pid (" + str(data["converter"]) + ") ") | ||
|
||
def check_docservice_running(): | ||
with open(processid_file_path, "r") as f: | ||
data = json.load(f) | ||
|
||
if(data["docservice"] > 0 and check_pid(data["docservice"])): | ||
sys.exit("Error : docservice running with pid (" + str(data["docservice"]) + ") ") | ||
|
||
def check_spellchecker_running(): | ||
with open(processid_file_path, "r") as f: | ||
data = json.load(f) | ||
|
||
if(data["spellchecker"] > 0 and check_pid(data["spellchecker"])): | ||
sys.exit("Error : spellchecker running with pid (" + str(data["spellchecker"]) + ") ") | ||
|
||
def check_converter_running(): | ||
with open(processid_file_path, "r") as f: | ||
data = json.load(f) | ||
|
||
if(data["converter"] > 0 and check_pid(data["converter"])): | ||
sys.exit("Error : converter running with pid (" + str(data["converter"]) + ") ") | ||
|
||
def check_pid(pid): | ||
try: | ||
os.kill(pid, 0) | ||
except OSError: | ||
return False | ||
else: | ||
return True | ||
|
||
def update_processid(docservice_process_id, spellchecker_process_id, converter_process_id): | ||
with open(processid_file_path, "r") as f: | ||
data = json.load(f) | ||
|
||
if(docservice_process_id > 0): | ||
data["docservice"] = docservice_process_id | ||
if(spellchecker_process_id > 0): | ||
data["spellchecker"] = spellchecker_process_id | ||
if(converter_process_id > 0): | ||
data["converter"] = converter_process_id | ||
|
||
with open(processid_file_path, "w") as jsonFile: | ||
json.dump(data, jsonFile, indent=4) | ||
|
||
with open(processid_file_path, "r") as f: | ||
dataupdated = json.load(f) | ||
#print("Process IDS docservice, spellchecker, converter :: "+str(dataupdated)) | ||
processid_file_path = "process_id.json" |
Oops, something went wrong.