diff --git a/conf/mongod.conf b/conf/mongod.conf new file mode 100644 index 0000000..5282891 --- /dev/null +++ b/conf/mongod.conf @@ -0,0 +1,43 @@ +# mongod.conf + +# for documentation of all options, see: +# http://docs.mongodb.org/manual/reference/configuration-options/ + +# Where and how to store data. +storage: + dbPath: /var/lib/mongodb + journal: + enabled: true +engine: wiredTiger/ +# mmapv1: +# wiredTiger: + +# where to write logging data. +systemLog: + destination: file + logAppend: true + path: /var/log/mongodb/mongod.log + +# network interfaces +net: + port: 27017 + bindIp: 127.0.0.1 + + +# how the process runs +processManagement: + timeZoneInfo: /usr/share/zoneinfo + +#security: + +#operationProfiling: + +replSetName: rs01/ + +#sharding: + +## Enterprise-Only Options: + +#auditLog: + +#snmp: diff --git a/conf/systemd.service b/conf/systemd.service index 35624e4..adcac84 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -13,10 +13,7 @@ StandardOutput=syslog StandardError=syslog SyslogIdentifier=rocketchat -Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 -MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 -ROOT_URL=http://__DOMAIN__:__PORT__ -PORT=__PORT__ +Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=http://__DOMAIN__:__PORT__ PORT=__PORT__ [Install] WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index 9dc1d3a..3bc49b0 100644 --- a/scripts/install +++ b/scripts/install @@ -137,12 +137,11 @@ ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --targ ynh_add_systemd_config -# #================================================= -# # MODIFY A CONFIG FILE -# #================================================= +#================================================= +# MODIFY A CONFIG FILE +#================================================= -ynh_replace_string --match_string=" engine:/" --replace_string="engine: wiredTiger/" --target_file="/etc/mongod.conf" -ynh_replace_string --match_string="replication:/replication:\n" --replace_string="replSetName: rs01/" --target_file="/etc/mongod.conf" +ynh_add_config --template="../conf/mongod.conf" --destination="/etc/mongod.conf" #================================================= # INTEGRATE SERVICE IN YUNOHOST