Sha256: 534ebcc319a0c47346409044048d3d910b8676f1c4b035f549c45bb778144f24

Contents?: true

Size: 472 Bytes

Versions: 43

Compression:

Stored size: 472 Bytes

Contents

module Incline
  class CLI
    class Prepare
      
      private
      
      def restart_nginx(shell)
        shell.with_stat('Restarting nginx') do
          # test the configuration.
          shell.sudo_exec('nginx -t')

          # stop the service.
          shell.sudo_exec_ignore_code 'systemctl stop nginx.service'
          
          # start the service.
          shell.sudo_exec 'systemctl start nginx.service'
        end
      end
      
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
incline-0.2.26 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.25 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.24 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.23 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.22 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.21 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.20 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.19 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.18 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.17 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.16 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.15 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.14 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.13 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.12 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.11 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.10 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.9 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.8 lib/incline/cli/prepare/restart_nginx.rb
incline-0.2.7 lib/incline/cli/prepare/restart_nginx.rb