Created
June 7, 2017 21:17
-
-
Save wuftymerguftyguff/62e1e6aa7811abfd252ef65a3a0344bc to your computer and use it in GitHub Desktop.
Bare minimum Sample Apps for VCS testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call all with one parameter the name of the pretend sample app from the vcs application agent | |
# cat startsampleapp | |
#!/bin/sh | |
sleep $(shuf -i 10-30 -n 1) | |
touch /tmp/$1 # add any steps, if required | |
exit 0 | |
# cat stopsampleapp | |
#!/bin/sh | |
sleep $(shuf -i 10-30 -n 1) | |
rm -f /tmp/$1 # add any steps, if required | |
exit 0 | |
# cat monitorsampleapp | |
#!/bin/sh | |
APPLICATION_IS_ONLINE=110 | |
APPLICATION_IS_OFFLINE=100 | |
if [ -f /tmp/$1 ] ; then # add any steps, if required | |
exit $APPLICATION_IS_ONLINE | |
else | |
exit $APPLICATION_IS_OFFLINE | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment