CentOS support and enabled memcached at startup.

see #98
This commit is contained in:
Antoine Nguyen
2017-02-09 16:31:14 +01:00
parent 5f36d6231f
commit 8791766052
3 changed files with 12 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ import shutil
import stat
from .. import python
from .. import system
from .. import utils
from . import base
@@ -19,7 +20,7 @@ class Automx(base.Installer):
no_daemon = True
packages = {
"deb": ["memcached", "unzip"],
"rpm": []
"rpm": ["memcached", "unzip"]
}
with_user = True
@@ -90,3 +91,4 @@ class Automx(base.Installer):
"""Additional tasks."""
self._setup_venv()
self._deploy_instance()
system.enable_and_start_service("memcached")

View File

@@ -136,10 +136,7 @@ class Installer(object):
if self.no_daemon:
return
name = self.get_daemon_name()
system.enable_service(name)
code, output = utils.exec_cmd("service {} status".format(name))
action = "start" if code else "restart"
utils.exec_cmd("service {} {}".format(name, action))
system.enable_and_start_service(name)
def run(self):
"""Run the installer."""