Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wuftymerguftyguff/62e1e6aa7811abfd252ef65a3a0344bc to your computer and use it in GitHub Desktop.
Save wuftymerguftyguff/62e1e6aa7811abfd252ef65a3a0344bc to your computer and use it in GitHub Desktop.
Bare minimum Sample Apps for VCS testing
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