summarylogtreecommitdiffstats
path: root/opennebula.service
blob: f0dc9f0bad3b033fc8a0ec34cdd82010c27f54a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[Unit]
Description=OpenNebula management
After=syslog.target network.target local-fs.target remote-fs.target
Requires=mysqld.service
Before=opennebula-scheduler.service
BindTo=opennebula-scheduler.service
Wants=opennebula-sunstone.service opennebula-econe.service opennebula-onegate.service opennebula-oneflow.service opennebula-scheduler.service

[Service]
User=oneadmin
Group=cloud
Type=simple
PermissionsStartOnly=true

# Start daemon in forground mode, when starting as forking process the
# daemon shuts down without obvious reason.
ExecStart=/usr/bin/oned -f
# Log file location must exist
ExecStartPre=/bin/mkdir -p /var/log/one
ExecStartPre=/bin/chown oneadmin:cloud /var/log/one
ExecStartPre=-/usr/bin/logrotate -s /tmp/logrotate.state -f /etc/logrotate.d/opennebula
ExecStop=/bin/kill -TERM $MAINPID
ExecStopPost=/usr/bin/rm -f /var/lock/one/one
ExecStopPost=/usr/share/one/follower_cleanup
PIDFile=/run/one/oned.pid
Restart=always

[Install]
WantedBy=multi-user.target