diff --git a/pages/06.bitwarden/docs.md b/pages/06.bitwarden/docs.md index 8b2cf4f..8511c96 100644 --- a/pages/06.bitwarden/docs.md +++ b/pages/06.bitwarden/docs.md @@ -30,4 +30,20 @@ cd /home/tanshu/webapps/warden nohup env RACK_ENV=production bundle exec rackup -p $PORT config.ru > /dev/null 2>&1 & sleep 3 pgrep -f "ruby2.4 /home/tanshu/gems/bin/rackup -p $PORT config.ru" > /home/tanshu/webapps/warden/run/ruby.pid +``` +3.2 `Stop` script where `$PORT` is the port of the custom webapp +```sh +#!/bin/sh +/usr/bin/pkill -f "ruby2.4 /home/tanshu/gems/bin/rackup -p $PORT config.ru" && rm -f /home/tanshu/webapps/warden/run/ruby.pid +``` +3.3 `Restart` script +``sh +#!/bin/bash +$HOME/webapps/warden/bin/stop +sleep 3 +$HOME/webapps/warden/bin/start +``` +3.4 Edit crontab using `export VISUAL=nano; crontab -e` and add the following line +```sh +*/20 * * * * ~/webapps/warden/bin/start ``` \ No newline at end of file