Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capistrano 3. To set bash shell on server instead csh

When cap3 try to execute comands on my FreeBSD server - I have an errors and my cap3 tasks doesn't work

DEBUG [0bb99d53] Command: if test ! -d /home/web_server/data/www/capistrano/site/shared/dumps; then echo "Directory does not exist '/home/web_server/data/www/capistrano/site/shared/dumps'" 1>&2; false; fi
DEBUG [0bb99d53]    if: Expression Syntax.
DEBUG [0bb99d53]    fi: Command not found.

And I know why - because my server use csh shell by default

% echo $0
-csh

Following cap3 variable doesn't work for me

set :shell, '/usr/local/bin/bash'
set :default_shell, '/usr/local/bin/bash'

How can I set shell for cap3 tasks?

like image 757
the-teacher Avatar asked Nov 10 '22 12:11

the-teacher


1 Answers

You could set the default shell to bash for the deploy user on your server.

chsh -s /usr/local/bin/bash [your_deploy_user]

This worked for me.

like image 65
Sander Visser Avatar answered Dec 29 '22 08:12

Sander Visser