Skip to content

Commit

Permalink
Merge pull request #39 from rpmfusion-infra/MongoDB
Browse files Browse the repository at this point in the history
added MongoDB
  • Loading branch information
MalteKiefer authored Jan 22, 2020
2 parents 1dfe4b4 + 395c224 commit 5eebcc7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugins/mongodb.plugin/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

cat <<EOF > /etc/yum.repos.d/mongodb.repo
[Mongodb]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc
EOF

dnf -y install mongodb-org
systemctl enable mongod.service
systemctl start mongod.service
18 changes: 18 additions & 0 deletions plugins/mongodb.plugin/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"icon": "mongodb",
"label": "MongoDB",
"description": "MongoDB is a cross-platform document-oriented database program.",
"license": "SSPL v1.0",
"category": "Development Tools",
"scripts": {
"exec": {
"label": "Install",
"command": "run-as-root -s install.sh"
},
"undo": {
"label": "Remove",
"command": "run-as-root -s uninstall.sh"
},
"status": { "command": "rpm --quiet --query mongodb-org" }
}
}
7 changes: 7 additions & 0 deletions plugins/mongodb.plugin/uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

dnf -y remove mongodb-org

if [ -f "/etc/yum.repos.d/mongodb.repo" ]; then
rm -f /etc/yum.repos.d/mongodb.repo
fi

0 comments on commit 5eebcc7

Please sign in to comment.