Advertisement
Joubu

restart plack

Sep 9th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #!/bin/zsh
  2.  
  3. ssh jonathan@jobib "DISPLAY=:0.0 gxmessage -nofocus -timeout 3 -borderless -button '' 'Restarting plack...'";
  4. for pid in $(pidof /usr/local/bin/plackup); do kill $pid; done
  5. INTRANET=1 INTRANETDIR=/home/koha/src plackup --port 5001 /home/koha/src/misc/plack/koha.psgi -E development >> /home/koha/var/log/koha
  6. -plack-error.log 2>&1 &
  7. OPAC=1 OPACDIR=/home/koha/src/opac plackup --port 5000 /home/koha/src/misc/plack/koha.psgi -E development >> /home/koha/var/log/koha
  8. -opac-plack-error.log 2>&1 &
  9.  
  10.  
  11. while ((1)) {
  12. nb_pids=$(pidof /usr/local/bin/plackup|wc -w);
  13. if [[ $nb_pids == 2 ]]; then
  14. ssh jonathan@jobib "DISPLAY=:0.0 gxmessage -nofocus -timeout 3 -borderless -button '' 'Done!'";
  15. break;
  16. else;
  17. sleep 0.5
  18. fi
  19. }
  20.  
  21. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement