summarylogtreecommitdiffstats
path: root/opennebula.service
blob: 443641a8825090cece7a4d6b86d2b0ef07eebcc2 (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
[Unit]
Description=OpenNebula management
After=syslog.target network.target local-fs.target remote-fs.target mysqld.service
Before=opennebula-scheduler.service
BindTo=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 /var/lock/one/one
PIDFile=/var/run/one/oned.pid
Restart=on-abnormal

[Install]
WantedBy=multi-user.target