diff options
author | Rafael Reggiani Manzo | 2016-09-03 12:31:09 -0300 |
---|---|---|
committer | Rafael Reggiani Manzo | 2016-09-03 12:31:09 -0300 |
commit | bd4fb343e5e5883ad06861dd9e7ec10625b54bfd (patch) | |
tree | 1e989d6293938856188c7588e0ab082ff3c2982f | |
parent | 897b1310bb64f11d034664351c89940ad488156a (diff) | |
download | aur-bd4fb343e5e5883ad06861dd9e7ec10625b54bfd.tar.gz |
Add addition unit for requiring mysql
This allows the default unit to not require MySQL and thus keep it
minimal. On the other hand, the second one enables easier management
for installations with MySQL.
-rw-r--r-- | opennebula-mysqld.service | 20 | ||||
-rw-r--r-- | opennebula.service | 2 |
2 files changed, 21 insertions, 1 deletions
diff --git a/opennebula-mysqld.service b/opennebula-mysqld.service new file mode 100644 index 000000000000..2c1d662b4cbc --- /dev/null +++ b/opennebula-mysqld.service @@ -0,0 +1,20 @@ +[Unit] +Description=OpenNebula management +After=network.target local-fs.target remote-fs.target mysqld.service +Requires=mysqld.service +Conflicts=opennebula + +[Service] +User=oneadmin +Group=cloud +Type=forking +PermissionsStartOnly=true +ExecStartPre=/usr/bin/mkdir -p /var/run/one +ExecStartPre=/usr/bin/mkdir -p /var/lock/one +ExecStartPre=/usr/bin/chown -R oneadmin:cloud /var/run/one +ExecStartPre=/usr/bin/chown -R oneadmin:cloud /var/lock/one +ExecStart=/usr/bin/one start +ExecStop=/usr/bin/one stop + +[Install] +WantedBy=multi-user.target diff --git a/opennebula.service b/opennebula.service index afa78eb72039..ac53467cc721 100644 --- a/opennebula.service +++ b/opennebula.service @@ -1,7 +1,7 @@ [Unit] Description=OpenNebula management After=network.target local-fs.target remote-fs.target mysqld.service -Requires=mysqld.service +Conflicts=opennebula-mysqld [Service] User=oneadmin |