summaryrefslogtreecommitdiff
path: root/lib/capistrano/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/capistrano/tasks')
-rw-r--r--lib/capistrano/tasks/deploy_restart.rake9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/capistrano/tasks/deploy_restart.rake b/lib/capistrano/tasks/deploy_restart.rake
new file mode 100644
index 0000000..3fe1f43
--- /dev/null
+++ b/lib/capistrano/tasks/deploy_restart.rake
@@ -0,0 +1,9 @@
+namespace :deploy do
+ desc "Restart Rails Service"
+ task :restart do
+ on roles(:app) do
+ execute "sudo /bin/systemctl restart rails.service"
+ end
+ end
+end
+after "deploy:finishing", "deploy:restart"