Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

put silverline names and tags in upstart script too #29

Merged
merged 2 commits into from

1 participant

@ghost

silverline (ticket #88 on unfuddle)

@till till was assigned
@till
Owner

Hey,

Please keep the extact filename of the upstart template like in scalarium's cookbooks. Then we only need to keep the
template and not do anything else.

To override a template in scalarium/cookbooks we duplicate the exact path – that's all.

Till

@ghost

Like this?

@till
Owner

Perfect!

@till till merged commit f1b34b8 into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 26, 2012
  1. put silverline names and tags in upstart script too

    Ulf Harnhammar authored
Commits on Sep 27, 2012
  1. overriding scalarium's template ticket #29

    Ulf Harnhammar authored
This page is out of date. Refresh to see the latest.
Showing with 45 additions and 0 deletions.
  1. +45 −0 mysql/templates/default/init.mysql.conf.erb
View
45 mysql/templates/default/init.mysql.conf.erb
@@ -0,0 +1,45 @@
+# MySQL Service
+
+description "MySQL Server"
+author "Mario Limonciello <superm1@ubuntu.com>"
+
+start on (net-device-up
+ and local-filesystems
+ and runlevel [2345])
+stop on runlevel [016]
+
+respawn
+
+env HOME=/etc/mysql
+env SL_NAME=<%= node[:silverline][:name] %>
+env SL_TAG_NAMES=<%= node[:silverline][:sl_tag_names] %>
+umask 007
+
+# The default of 5 seconds is too low for mysql which needs to flush buffers
+kill timeout 300
+
+pre-start script
+ #Sanity checks
+ [ -r $HOME/my.cnf ]
+ [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld
+ # Load AppArmor profile
+ if aa-status --enabled 2>/dev/null; then
+ apparmor_parser -r /etc/apparmor.d/usr.sbin.mysqld || true
+ fi
+ LC_ALL=C BLOCKSIZE= df --portability /var/lib/mysql/. | tail -n 1 | awk '{ exit ($4<4096) }'
+end script
+
+exec /usr/sbin/mysqld
+
+post-start script
+ for i in `seq 1 30` ; do
+ /usr/bin/mysqladmin --defaults-file="${HOME}"/debian.cnf ping && {
+ exec "${HOME}"/debian-start
+ # should not reach this line
+ exit 2
+ }
+ sleep 1
+ done
+ exit 1
+end script
+
Something went wrong with that request. Please try again.