mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-11-04 15:51:23 +00:00
mongodb: Add persist and fix bin (#3009)
* mongodb: Add persist and fix bin * Fix post_install script
This commit is contained in:
parent
1ca43f4b30
commit
c252e16986
28
mongodb.json
28
mongodb.json
@ -16,7 +16,11 @@
|
|||||||
"bin": [
|
"bin": [
|
||||||
"bin\\bsondump.exe",
|
"bin\\bsondump.exe",
|
||||||
"bin\\mongo.exe",
|
"bin\\mongo.exe",
|
||||||
|
[
|
||||||
"bin\\mongod.exe",
|
"bin\\mongod.exe",
|
||||||
|
"mongod",
|
||||||
|
"--config \"$dir\\bin\\mongod.cfg\""
|
||||||
|
],
|
||||||
"bin\\mongodump.exe",
|
"bin\\mongodump.exe",
|
||||||
"bin\\mongoexport.exe",
|
"bin\\mongoexport.exe",
|
||||||
"bin\\mongofiles.exe",
|
"bin\\mongofiles.exe",
|
||||||
@ -27,9 +31,16 @@
|
|||||||
"bin\\mongotop.exe"
|
"bin\\mongotop.exe"
|
||||||
],
|
],
|
||||||
"post_install": [
|
"post_install": [
|
||||||
"# create initial directories",
|
"$file = \"$dir\\bin\\mongod.cfg\"",
|
||||||
"if(!(test-path 'C:\\data')) { mkdir 'C:\\data' > $null }",
|
"$cfg = (Get-Content $file)",
|
||||||
"if(!(test-path 'C:\\data\\db')) { mkdir 'C:\\data\\db' > $null }"
|
"$cfg = $cfg -replace '%MONGO_DATA_PATH%', \"$dir\\data\"",
|
||||||
|
"$cfg = $cfg -replace '%MONGO_LOG_PATH%', \"$dir\\log\"",
|
||||||
|
"Set-Content $file ($cfg -join \"`n\") -Encoding Ascii -Force"
|
||||||
|
],
|
||||||
|
"persist": [
|
||||||
|
"bin\\mongod.cfg",
|
||||||
|
"data",
|
||||||
|
"log"
|
||||||
],
|
],
|
||||||
"checkver": {
|
"checkver": {
|
||||||
"url": "https://www.mongodb.com/download-center/community",
|
"url": "https://www.mongodb.com/download-center/community",
|
||||||
@ -48,5 +59,14 @@
|
|||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"vcredist": "extras/vcredist2017"
|
"vcredist": "extras/vcredist2017"
|
||||||
}
|
},
|
||||||
|
"notes": [
|
||||||
|
"Windows server 2012/2008 and Windows 7/8/8.1 need KB2999226 to provide Universal C Runtime support for Windows.",
|
||||||
|
"For more infomations, please refer to:",
|
||||||
|
"https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows",
|
||||||
|
"",
|
||||||
|
"mongod shim use \"$dir\\bin\\mongod.cfg\" as the default config file.",
|
||||||
|
"To use a different config file, please run",
|
||||||
|
"\"$dir\\bin\\mongod.exe --config NEW_CONFIG_FILE\""
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user