title: How do I convert the following shell commands in a chef recipe?
body: <p>How do I convert the following shell commands in a chef recipe?</p>
  
  <p><strong>Install</strong></p>
  
  <pre><code>sudo easy_install pygments
  sudo echo 'export RAILS_ENV=production' &gt;&gt; ~/.bash_profile
  sudo adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
  ssh-keygen -t rsa
  sudo -H -u git gitosis-init &lt; ~/.ssh/id_rsa.pub
  sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
  
  echo "gem: --no-rdoc --no-ri" &gt; ~/.gemrc
  rvmsudo gem install passenger
  rvmsudo passenger-install-nginx-module
  </code></pre>
  
  <p><strong>Creating an Upstart file for nginx</strong></p>
  
  <p>sudo vim /etc/init/nginx.conf</p>
  
  <pre><code>description "Nginx HTTP Server"
  
  start on filesystem
  stop on runlevel [!2345]
  
  respawn
  
  exec /opt/nginx/sbin/nginx -g "daemon off;"
  </code></pre>
  
  <p><strong>Restart the VM</strong></p>
  
  <pre><code>sudo shutdown -r now
  </code></pre>
  
  <p><strong>Verify nginx running</strong></p>
  
  <pre><code>sudo initctl list | grep nginx
  </code></pre>