diff options
Diffstat (limited to 'distro/arch')
-rw-r--r-- | distro/arch/etc/conf.d/chef-client.conf | 5 | ||||
-rw-r--r-- | distro/arch/etc/conf.d/chef-expander.conf | 8 | ||||
-rw-r--r-- | distro/arch/etc/conf.d/chef-server-webui.conf | 10 | ||||
-rw-r--r-- | distro/arch/etc/conf.d/chef-server.conf | 10 | ||||
-rw-r--r-- | distro/arch/etc/conf.d/chef-solr.conf | 8 | ||||
-rw-r--r-- | distro/arch/etc/rc.d/chef-client | 90 | ||||
-rw-r--r-- | distro/arch/etc/rc.d/chef-expander | 78 | ||||
-rw-r--r-- | distro/arch/etc/rc.d/chef-server | 78 | ||||
-rw-r--r-- | distro/arch/etc/rc.d/chef-server-webui | 78 | ||||
-rw-r--r-- | distro/arch/etc/rc.d/chef-solr | 78 |
10 files changed, 443 insertions, 0 deletions
diff --git a/distro/arch/etc/conf.d/chef-client.conf b/distro/arch/etc/conf.d/chef-client.conf new file mode 100644 index 0000000000..efbead3149 --- /dev/null +++ b/distro/arch/etc/conf.d/chef-client.conf @@ -0,0 +1,5 @@ +LOGFILE=/var/log/chef/client.log +CONFIG=/etc/chef/client.rb +INTERVAL=1800 +SPLAY=20 +CHEF_CLIENT_ARGS="-L $LOGFILE -d -c $CONFIG -i $INTERVAL -s $SPLAY" diff --git a/distro/arch/etc/conf.d/chef-expander.conf b/distro/arch/etc/conf.d/chef-expander.conf new file mode 100644 index 0000000000..4c70bdd2eb --- /dev/null +++ b/distro/arch/etc/conf.d/chef-expander.conf @@ -0,0 +1,8 @@ +LOGFILE=/var/log/chef/expander.log +CONFIG=/etc/chef/solr.rb +USER=chef +GROUP=chef +# Sleep to give daemon enough time to fully start or stop. +DIETIME=5 +STARTTIME=5 +CHEF_EXPANDER_ARGS="-d -c $CONFIG -L $LOGFILE -n 1 -i 1" diff --git a/distro/arch/etc/conf.d/chef-server-webui.conf b/distro/arch/etc/conf.d/chef-server-webui.conf new file mode 100644 index 0000000000..a737a84aa6 --- /dev/null +++ b/distro/arch/etc/conf.d/chef-server-webui.conf @@ -0,0 +1,10 @@ +LOGFILE=/var/log/chef/server-webui.log +CONFIG=/etc/chef/webui.rb +ADAPTER=thin +PORT=4040 +USER=chef +GROUP=chef +# Sleep to give daemon enough time to fully start or stop. +STARTTIME=10 +DIETIME=5 +CHEF_SERVER_WEBUI_ARGS="-p $PORT -e production -d -a $ADAPTER -L $LOGFILE -C $CONFIG -u $USER -G $GROUP" diff --git a/distro/arch/etc/conf.d/chef-server.conf b/distro/arch/etc/conf.d/chef-server.conf new file mode 100644 index 0000000000..95518ce045 --- /dev/null +++ b/distro/arch/etc/conf.d/chef-server.conf @@ -0,0 +1,10 @@ +LOGFILE=/var/log/chef/server.log +CONFIG=/etc/chef/server.rb +ADAPTER=thin +PORT=4000 +USER=chef +GROUP=chef +# Sleep to give daemon enough time to fully start or stop. +STARTTIME=10 +DIETIME=5 +CHEF_SERVER_ARGS="-p $PORT -e production -d -a $ADAPTER -L $LOGFILE -C $CONFIG -u $USER -G $GROUP" diff --git a/distro/arch/etc/conf.d/chef-solr.conf b/distro/arch/etc/conf.d/chef-solr.conf new file mode 100644 index 0000000000..a4764a2a8e --- /dev/null +++ b/distro/arch/etc/conf.d/chef-solr.conf @@ -0,0 +1,8 @@ +LOGFILE=/var/log/chef/solr.log +CONFIG=/etc/chef/solr.rb +USER=chef +GROUP=chef +# Sleep to give daemon enough time to fully start or stop. +DIETIME=5 +STARTTIME=5 +CHEF_SOLR_ARGS="-d -c $CONFIG -L $LOGFILE -u $USER -g $GROUP" diff --git a/distro/arch/etc/rc.d/chef-client b/distro/arch/etc/rc.d/chef-client new file mode 100644 index 0000000000..36f00bad6a --- /dev/null +++ b/distro/arch/etc/rc.d/chef-client @@ -0,0 +1,90 @@ +#!/bin/bash +# +# Copyright (c) 2009-2010 Opscode, Inc <legal@opscode.com> +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +daemon_bin="/usr/bin/chef-client" +daemon_name=$(basename $daemon_bin) +PIDF="/var/run/$daemon_name.pid" + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/$daemon_name.conf + +get_pid() { + pidof -o %PPID $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name" + PID=$(get_pid) + if [ -z "$PID" ]; then + [ -f $PIDF ] && rm -f $PIDF + $daemon_bin --pid $PIDF $CHEF_CLIENT_ARGS + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo $(get_pid) > $PIDF + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f $PIDF &>/dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + sleep 3 + $0 start + ;; + + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + + run) + stat_busy "Triggering new run of $daemon_name daemon" + PID=$(get_pid) + [ ! -z "$PID" ] && kill -SIGUSR1 $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + stat_done + fi + ;; + + *) + echo "usage: $) {start|stop|restart|status|run}" +esac diff --git a/distro/arch/etc/rc.d/chef-expander b/distro/arch/etc/rc.d/chef-expander new file mode 100644 index 0000000000..5925efe2b8 --- /dev/null +++ b/distro/arch/etc/rc.d/chef-expander @@ -0,0 +1,78 @@ +#!/bin/bash +# +# Copyright (c) 2009-2010 Opscode, Inc <legal@opscode.com> +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +daemon_bin="/usr/bin/chef-expander" +daemon_name=$(basename $daemon_bin) +PIDF="/var/run/$daemon_name.pid" + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/$daemon_name.conf + +get_pid() { + pidof -o %PPID $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name" + PID=$(get_pid) + if [ -z "$PID" ]; then + [ -f $PIDF ] && rm -f $PIDF + $daemon_bin -P $PIDF $CHEF_EXPANDER_ARGS + [ -n "$STARTTIME" ] && sleep $STARTTIME + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo $(get_pid) > $PIDF + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f $PIDF &>/dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + [ -n "$DIETIME" ] && sleep $DIETIME + $0 start + [ -n "$STARTTIME" ] && sleep $STARTTIME + ;; + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + *) + echo "usage: $) {start|stop|restart|status}" +esac diff --git a/distro/arch/etc/rc.d/chef-server b/distro/arch/etc/rc.d/chef-server new file mode 100644 index 0000000000..59f926c2c9 --- /dev/null +++ b/distro/arch/etc/rc.d/chef-server @@ -0,0 +1,78 @@ +#!/bin/bash +# +# Copyright (c) 2009-2010 Opscode, Inc <legal@opscode.com> +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +daemon_bin="/usr/bin/chef-server" +daemon_name=$(basename $daemon_bin) +PIDF="/var/run/$daemon_name.pid" + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/$daemon_name.conf + +get_pid() { + pidof -o %PPID $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name" + PID=$(get_pid) + if [ -z "$PID" ]; then + [ -f $PIDF ] && rm -f $PIDF + $daemon_bin -P $PIDF $CHEF_SERVER_ARGS + [ -n "$STARTTIME" ] && sleep $STARTTIME + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo $(get_pid) > $PIDF + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f $PIDF &>/dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + [ -n "$DIETIME" ] && sleep $DIETIME + $0 start + [ -n "$STARTTIME" ] && sleep $STARTTIME + ;; + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + *) + echo "usage: $) {start|stop|restart|status}" +esac diff --git a/distro/arch/etc/rc.d/chef-server-webui b/distro/arch/etc/rc.d/chef-server-webui new file mode 100644 index 0000000000..79a9b77c1c --- /dev/null +++ b/distro/arch/etc/rc.d/chef-server-webui @@ -0,0 +1,78 @@ +#!/bin/bash +# +# Copyright (c) 2009-2010 Opscode, Inc <legal@opscode.com> +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +daemon_bin="/usr/bin/chef-server-webui" +daemon_name=$(basename $daemon_bin) +PIDF="/var/run/$daemon_name.pid" + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/$daemon_name.conf + +get_pid() { + pidof -o %PPID $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name" + PID=$(get_pid) + if [ -z "$PID" ]; then + [ -f $PIDF ] && rm -f $PIDF + $daemon_bin -P $PIDF $CHEF_SERVER_WEBUI_ARGS + [ -n "$STARTTIME" ] && sleep $STARTTIME + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo $(get_pid) > $PIDF + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f $PIDF &>/dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + [ -n "$DIETIME" ] && sleep $DIETIME + $0 start + [ -n "$STARTTIME" ] && sleep $STARTTIME + ;; + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + *) + echo "usage: $) {start|stop|restart|status}" +esac diff --git a/distro/arch/etc/rc.d/chef-solr b/distro/arch/etc/rc.d/chef-solr new file mode 100644 index 0000000000..a3682a495a --- /dev/null +++ b/distro/arch/etc/rc.d/chef-solr @@ -0,0 +1,78 @@ +#!/bin/bash +# +# Copyright (c) 2009-2010 Opscode, Inc <legal@opscode.com> +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +daemon_bin="/usr/bin/chef-solr" +daemon_name=$(basename $daemon_bin) +PIDF="/var/run/$daemon_name.pid" + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/$daemon_name.conf + +get_pid() { + pidof -o %PPID $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name" + PID=$(get_pid) + if [ -z "$PID" ]; then + [ -f $PIDF ] && rm -f $PIDF + $daemon_bin -P $PIDF $CHEF_SOLR_ARGS + [ -n "$STARTTIME" ] && sleep $STARTTIME + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo $(get_pid) > $PIDF + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f $PIDF &>/dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + [ -n "$DIETIME" ] && sleep $DIETIME + $0 start + [ -n "$STARTTIME" ] && sleep $STARTTIME + ;; + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + *) + echo "usage: $) {start|stop|restart|status}" +esac |