Giter Site home page Giter Site logo

capistrano-upstart's Introduction

capistrano-upstart

a capistrano recipe to manage upstart service.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-upstart'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-upstart

Usage

This recipes will try to set up Upstart service after deploy:setup tasks. To enable this recipe for your application, add following in you config/deploy.rb.

# config/deploy.rb
require "capistrano-upstart"
set :upstart_service_name, "hello"
set :upstart_script, <<-EOS
  exec echo "hello, world"
EOS

Following options are available to manage your service.

  • :upstart_service_name - the name of your Upstart service.
  • :upstart_exec - the exec script of your Upstart service.
  • :upstart_script - the script of your Upstart service. You must specify either :upstart_exec or :upstart_script.
  • :upstart_pre_start_script - the pre-start script of your Upstart service.
  • :upstart_post_start_script - the post-start script of your Upstart service.
  • :upstart_pre_stop_script - the pre-stop script of your Upstart service.
  • :upstart_post_stop_script - the post-stop script of your Upstart service.
  • :upstart_start_on - specify when your service should be starting on. By default runlevel 2, 3, 4 and 5.
  • :upstart_stop_on - specify when your service should be stopping on. By default runlevel 0, 1 and 6.
  • :upstart_env - environmental variables for your service.
  • :upstart_chdir - specify the working directory of service. Use :current_path by default.
  • :upstart_console - the console directive of Upstart. none by default.
  • :upstart_respawn - specify whether service should be respawned or not. true by default.
  • :upstart_setuid - specify the user under whom the service is to be ran.
  • :upstart_setgid - specify the group under which the service is to be ran.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Author

License

MIT

capistrano-upstart's People

Contributors

jasiek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.