Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Bugfix. version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytro committed Aug 26, 2013
1 parent 7684aed commit 27b29e8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 4 additions & 0 deletions History.md
@@ -1,3 +1,7 @@
### v.0.3.1
* Mon Aug 26 2013 -- Dmytro Kovalov
- Bugfix: fix for init.d script to load defaults file

### v.0.3.0
* Mon Aug 26 2013 -- Dmytro Kovalov
- Feature: Configurable hostname regex (see `NAGIOS_HOST_CUSTOM_REGEXi` in `config/nagira.defaults`)
Expand Down
28 changes: 12 additions & 16 deletions config/nagira.init_d
Expand Up @@ -23,22 +23,19 @@ process_name="Sinatra Nagira services"
pid_file=/var/run/nagira.pid


load_defaults () {
which sherlock > /dev/null 2>&1 && eval $(sherlock | grep FAMILY) || { echo "sherlock not found"; exit 2; }

case $FAMILY in
'rh')
DEFAULTS=/etc/sysconfig/nagira ;;
'debian')
DEFAULTS=/etc/default/nagira ;;
*)
echo "Unknown OS or distribution version: $FAMILY"
which sherlock > /dev/null 2>&1 && eval $(sherlock | grep FAMILY) || { echo "sherlock not found"; exit 2; }

case $FAMILY in
'rh')
DEFAULTS=/etc/sysconfig/nagira ;;
'debian')
DEFAULTS=/etc/default/nagira ;;
*)
echo "Unknown OS or distribution version: $FAMILY"
exit 1
;;
esac
source $DEFAULTS || { echo "Can not load defaults file" ; exit 1 ; }
}

esac
source $DEFAULTS || { echo "Can not load defaults file" ; exit 1 ; }

##
# Some reasonable defaults if not set in defaults file
Expand Down Expand Up @@ -68,8 +65,7 @@ get_pid () {
start() {
[ ! -z "$(get_pid)" ] && { status; return 1; }
echo -n "Starting ${process_name}: "
load_defaults
su - $NAGIRA_USER -s /bin/bash -c "$RVM_STRING ; RACK_ENV=$RACK_ENV nagira&" > $NAGIRA_LOG 2>&1
su - $NAGIRA_USER -s /bin/bash -c "source $DEFAULTS ; $RVM_STRING ; RACK_ENV=$RACK_ENV nagira&" > $NAGIRA_LOG 2>&1
sleep 5
process=$(get_pid)
if [ -z "$process" ]; then
Expand Down
2 changes: 1 addition & 1 deletion version.txt
@@ -1 +1 @@
0.3.0
0.3.1

0 comments on commit 27b29e8

Please sign in to comment.