Skip to content

Instantly share code, notes, and snippets.

@bebyx
Created August 14, 2020 11:25
Show Gist options
  • Save bebyx/64af6cf8718d2df759aaf9bf14ed3fbd to your computer and use it in GitHub Desktop.
Save bebyx/64af6cf8718d2df759aaf9bf14ed3fbd to your computer and use it in GitHub Desktop.
#!/bin/sh
DIR=/home/bebyx/CI/
inotifywait -m -e close_write "$DIR" | while read file; do
pkill java
sudo cp -R /home/bebyx/CI/eschool.jar /home/bebyx/eSchool/target/eschool.jar
sudo java -jar /home/bebyx/eSchool/target/eschool.jar --spring.config.location=file:///home/bebyx/eSchool/src/main/resources/application.properties > /home/bebyx/eschool2.log &2>/home/bebyx/eschool2err.log &
done
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment