From 912a3adf61b164b7c543d6bb816e6a491071ecba Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Tue, 10 Oct 2017 11:07:04 -0400 Subject: [PATCH] Set the correct service name for mongodb on armhf --- scripts/_common.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 495011e..7a02fc2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -20,11 +20,15 @@ waitforservice() { } installdeps(){ + mongo=mongod if [ $(dpkg --print-architecture) == "armhf" ]; then #Install mongodb for debian armhf sudo apt-get update sudo apt-get install -y mongodb-server + + # armhf has the old version of mongod, called mongodb + mongo=mongodb else #Install mongodb for debian x86/x64 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 @@ -34,11 +38,11 @@ installdeps(){ fi # start mongodb service - sudo systemctl enable mongodb.service - sudo systemctl start mongodb.service + sudo systemctl enable ${mongo}.service + sudo systemctl start ${mongo}.service # add mongodb to services - sudo yunohost service add mongodb -l /var/log/mongodb/mongod.log + sudo yunohost service add ${mongo} -l /var/log/${mongo}/${mongo}.log #Install other dependencies sudo apt-get install -y gzip curl graphicsmagick npm