* fixing debian postinstall issue

This commit is contained in:
Seth Call 2014-01-14 09:47:30 -06:00
parent 59c1b02e1c
commit 1f31bb3ff5
7 changed files with 8 additions and 117 deletions

View File

@ -90,12 +90,12 @@ end
group :test, :cucumber do
gem 'capybara'
if ENV['JAMWEB_QT5'] == '1'
# necessary on platforms such as arch linux, where pacman -S qt5-webkit is your easiet option
gem "capybara-webkit", :git => 'git://github.com/thoughtbot/capybara-webkit.git'
else
#if ENV['JAMWEB_QT5'] == '1'
# # necessary on platforms such as arch linux, where pacman -S qt5-webkit is your easiet option
# gem "capybara-webkit", :git => 'git://github.com/thoughtbot/capybara-webkit.git'
#else
gem "capybara-webkit"
end
#end
gem 'capybara-screenshot'
gem 'cucumber-rails', :require => false #, '1.3.0', :require => false
gem 'guard-spork', '0.3.2'

View File

@ -1,19 +0,0 @@
#!/bin/bash -l
# default config values
PORT=3000
BUILD_NUMBER=`cat /var/lib/jam-web/BUILD_NUMBER`
CONFIG_FILE="/etc/jam-web/audiomixer-worker-upstart.conf"
if [ -e "$CONFIG_FILE" ]; then
. "$CONFIG_FILE"
fi
# I don't like doing this, but the next command (bundle exec) retouches/generates
# the gemfile. This unfortunately means the next debian update doesn't update this file.
# Ultimately this means an old Gemfile.lock is left behind for a new package,
# and bundle won't run because it thinks it has the wrong versions of gems
rm -f Gemfile.lock
RAILS_ENV=production BUILD_NUMBER=$BUILD_NUMBER QUEUE=audiomixer exec bundle exec rake environment resque:work

View File

@ -1,7 +0,0 @@
description "audiomixer-worker"
start on startup
start on runlevel [2345]
stop on runlevel [016]
exec start-stop-daemon --start --chdir /var/lib/jam-web --exec /var/lib/jam-web/script/package/audiomixer-worker-upstart-run.sh

View File

@ -15,25 +15,6 @@ mkdir -p /var/lib/$NAME/tmp
mkdir -p /etc/$NAME
mkdir -p /var/log/$NAME
chown -R $USER:$GROUP /var/lib/$NAME
chown -R $USER:$GROUP /etc/$NAME
chown -R $USER:$GROUP /var/log/$NAME
# do the same for audiomixer-worker
NAME="audiomixer-worker"
USER="$NAME"
GROUP="$NAME"
# copy upstart file
cp /var/lib/$NAME/script/package/$NAME.conf /etc/init/$NAME.conf
mkdir -p /var/lib/$NAME/log
mkdir -p /var/lib/$NAME/tmp
mkdir -p /etc/$NAME
mkdir -p /var/log/$NAME
chown -R $USER:$GROUP /var/lib/$NAME
chown -R $USER:$GROUP /etc/$NAME
chown -R $USER:$GROUP /var/log/$NAME

View File

@ -24,30 +24,4 @@ then
fi
userdel $NAME
fi
NAME="audiomixer-worker"
set -e
if [ "$1" = "remove" ]
then
set +e
# stop the process, if any is found. we don't want this failing to cause an error, though.
sudo stop $NAME
set -e
if [ -f /etc/init/$NAME.conf ]; then
rm /etc/init/$NAME.conf
fi
fi
if [ "$1" = "purge" ]
then
if [ -d /var/lib/$NAME ]; then
rm -rf /var/lib/$NAME
fi
userdel $NAME
fi
fi

View File

@ -34,42 +34,4 @@ then
fi
# NIS no longer a possible problem; stop ignoring errors
set -e
# do the same for audiomixer-worker
NAME="audiomixer-worker"
set -eu
HOME="/var/lib/$NAME"
USER="$NAME"
GROUP="$NAME"
# if NIS is used, then errors can occur but be non-fatal
if which ypwhich >/dev/null 2>&1 && ypwhich >/dev/null 2>&1
then
set +e
fi
if ! getent group "$GROUP" >/dev/null
then
addgroup --system "$GROUP" >/dev/null
fi
# creating user if it isn't already there
if ! getent passwd "$USER" >/dev/null
then
adduser \
--system \
--home $HOME \
--shell /bin/false \
--disabled-login \
--ingroup "$GROUP" \
--gecos "$USER" \
"$USER" >/dev/null
fi
# NIS no longer a possible problem; stop ignoring errors
set -e
set -e

View File

@ -1,3 +1,3 @@
module JamWebsockets
VERSION = "0.0.1"
VERSION = "0.1.1"
end