noosfero | 3 new commits pushed to repository
Antonio Terceiro
gitlab at gitlab.com
Thu Mar 5 12:16:59 BRT 2015
Antonio Terceiro pushed to refs/heads/master at <a href="https://gitlab.com/noosfero/noosfero">Noosfero / noosfero</a>
Commits:
<a href="https://gitlab.com/noosfero/noosfero/commit/1d8c9a7544ac494dff802804cfe6aaf948306e28">1d8c9a75</a> by Lucas Kanashiro
Updated init.d script
Verify if /lib/init/vars.sh exists before source it
- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/8e6928205b19648855a2d1e8665a61ca698485f0">8e692820</a> by Lucas Kanashiro
Added 'bundle exec' in script/production
Where have some gem dependency was added 'bundle exec' in call
- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/317501e26006c42358ffca5429993564f981777c">317501e2</a> by Antonio Terceiro
Merge branch 'update_production_script' into 'master'
Update production script
- Verify if /lib/init/vars.sh file exist before source it in etc/init.d/noosfero
- Add 'bundle exec' where is needed in script/production
See merge request !488
- - - - -
Changes:
=====================================
etc/init.d/noosfero
=====================================
--- a/etc/init.d/noosfero
+++ b/etc/init.d/noosfero
@@ -36,7 +36,9 @@ NOOSFERO_USER=noosfero
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
-. /lib/init/vars.sh
+if [ -e /lib/init/vars.sh ]; then
+ . /lib/init/vars.sh
+fi
if [ -z "$NOOSFERO_DIR" ] || [ -z "$NOOSFERO_USER" ]; then
echo "NOOSFERO_DIR or NOOSFERO_USER not defined, noosfero not being started."
=====================================
script/production
=====================================
--- a/script/production
+++ b/script/production
@@ -26,11 +26,11 @@ clear_cache() {
}
do_start() {
- rake db:migrate SCHEMA=/dev/null
+ bundle exec rake db:migrate SCHEMA=/dev/null
clear_cache
environments_loop start
- whenever --write-crontab --set 'environment=production'
- ruby -S thin -C config/thin.yml start
+ bundle exec whenever --write-crontab --set 'environment=production'
+ ruby -S bundle exec thin -C config/thin.yml start
}
do_stop() {
@@ -39,23 +39,23 @@ do_stop() {
# back to stopping the daemons by manually reading their PID files, killing
# them and wiping the PID files.
- ruby -S thin -C config/thin.yml stop ||
+ ruby -S bundle exec thin -C config/thin.yml stop ||
stop_via_pid_file tmp/pids/thin.*.pid
environments_loop stop ||
stop_via_pid_file tmp/pids/delayed_job.pid tmp/pids/delayed_job.*.pid tmp/pids/feed-updater.*.pid
- whenever --clear-crontab
+ bundle exec whenever --clear-crontab
}
do_restart() {
- rake db:migrate SCHEMA=/dev/null
+ bundle exec rake db:migrate SCHEMA=/dev/null
environments_loop stop ||
stop_via_pid_file tmp/pids/delayed_job.pid tmp/pids/delayed_job.*.pid tmp/pids/feed-updater.*.pid
environments_loop start
clear_cache
- ruby -S thin -C config/thin.yml restart --onebyone
+ ruby -S bundle exec thin -C config/thin.yml restart --onebyone
}
stop_via_pid_file() {
@@ -76,11 +76,11 @@ environments_loop() {
for environment in $environments; do
env=$(basename $environment | cut -d. -f1)
RAILS_ENV=$env ./script/delayed_job -i $env "$action"
- RAILS_ENV=$env ./script/feed-updater "$action" -i $env
+ RAILS_ENV=$env bundle exec ./script/feed-updater "$action" -i $env
done
else
./script/delayed_job "$action"
- ./script/feed-updater "$action"
+ bundle exec ./script/feed-updater "$action"
fi
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150305/46142a52/attachment.html>
More information about the Noosfero-dev
mailing list