Skip to content

Commit

Permalink
added systemd init scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
deric committed Dec 8, 2014
1 parent 02d9207 commit 6aa2b43
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 9 deletions.
18 changes: 9 additions & 9 deletions build_mesos
Expand Up @@ -176,16 +176,16 @@ function init_scripts {
case "$1" in
debian/*)
mkdir -p etc/init.d
cp -p "$this"/debian/master.init etc/init.d/mesos-master
cp -p "$this"/debian/slave.init etc/init.d/mesos-slave ;;
ubuntu/*)
cp -p "$this"/init/master.init etc/init.d/mesos-master
cp -p "$this"/init/slave.init etc/init.d/mesos-slave ;;
ubuntu/*|redhat/6|redhat/6.*|centos/6|centos/6.*)
mkdir -p etc/init
cp "$this"/ubuntu/master.upstart etc/init/mesos-master.conf
cp "$this"/ubuntu/slave.upstart etc/init/mesos-slave.conf ;;
redhat/6|redhat/6.*|centos/6|centos/6.*)
mkdir -p etc/init
cp "$this"/ubuntu/master.upstart etc/init/mesos-master.conf
cp "$this"/ubuntu/slave.upstart etc/init/mesos-slave.conf ;;
cp "$this"/upstart/master.upstart etc/init/mesos-master.conf
cp "$this"/upstart/slave.upstart etc/init/mesos-slave.conf ;;
fedora/*|redhat/7|redhat/7.*|centos/7|centos/7.*)
mkdir -p usr/lib/systemd/system
cp "$this"/systemd/master.systemd usr/lib/systemd/system/mesos-master.service
cp "$this"/systemd/slave.systemd usr/lib/systemd/system/mesos-slave.service ;;
*) err "Not sure how to make init scripts for: $1" ;;
esac
}
Expand Down
3 changes: 3 additions & 0 deletions fedora/mesos.postinst
@@ -0,0 +1,3 @@
ldconfig
systemctl enable mesos-master
systemctl enable mesos-slave
2 changes: 2 additions & 0 deletions fedora/mesos.postrm
@@ -0,0 +1,2 @@
#rm -rf /var/log/mesos /etc/mesos

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions mesos-repo
Submodule mesos-repo added at 3a6942
3 changes: 3 additions & 0 deletions redhat/7/mesos.postinst
@@ -0,0 +1,3 @@
ldconfig
systemctl enable mesos-master
systemctl enable mesos-slave
2 changes: 2 additions & 0 deletions redhat/7/mesos.postrm
@@ -0,0 +1,2 @@
#rm -rf /var/log/mesos /etc/mesos

13 changes: 13 additions & 0 deletions systemd/master.systemd
@@ -0,0 +1,13 @@
[Unit]
Description=Mesos Master
After=network.target
Wants=network.target

[Service]
ExecStart=/usr/bin/mesos-init-wrapper master
Restart=always
RestartSec=20
LimitNOFILE=16384

[Install]
WantedBy=multi-user.target
14 changes: 14 additions & 0 deletions systemd/slave.systemd
@@ -0,0 +1,14 @@
[Unit]
Description=Mesos Slave
After=network.target
Wants=network.target

[Service]
ExecStart=/usr/bin/mesos-init-wrapper slave
Restart=on-abort
Restart=always
RestartSec=20
LimitNOFILE=16384

[Install]
WantedBy=multi-user.target
File renamed without changes.
File renamed without changes.

0 comments on commit 6aa2b43

Please sign in to comment.