diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cc366b2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2015 Nathan Adams + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index d5bafee..c56b55c 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,28 @@ For example: http://127.0.0.1/kritbit/service/run/ And kritbit will run through the jobs that are marked to be ran by kritbit and analyse the cron script to determine if it needs to be ran and run it. + +# Sending script runs to kritbit + +There is provided runcommand Python script in the scripts directory. This should be modified to fill in data for your script. This will wrap the encryption and data structure in an easy to use library. + +To use it just invoke it like so: + + /usr/bin/python runcommand.py '/bin/bash script.sh' + +If you want to make it more generic you may replace SHARED_KEY and HASH variables with the following: + + SHARED_KEY = sys.argv[1] + HASH = sys.argv[2] + URL = "https:///kritbit/service/upload/" + sys.argv[3] + "/" + +Then the command would be similar to the following: + + /usr/share/kritbit/runcommand.py '' '/bin/bash /root/downloadrouterconfig.sh' + +ie: + + /usr/share/kritbit/runcommand.py '#$FDSFA#$' eeeffff3434343 7 '/bin/bash /root/downloadrouterconfig.sh' # Long-term TODO @@ -74,7 +96,7 @@ Patches are welcome of any kind. But please do note that your code will be integ # Attributions -Kritbit uses the following projects +Kritbit is licensed under the MIT uses the following projects - [Haplous Framework](https://srchub.org/p/haplousframework/) - MIT - [h2o template engine](https://github.com/speedmax/h2o-php) - MIT @@ -90,4 +112,8 @@ Kritbit uses the following projects - [dynatable](http://www.dynatable.com/) - AGPL - [is_cli](http://stackoverflow.com/a/25967493/195722) +# Donations + +Donations can be accepted through [Paypal](paypal.me/NateAdams) or through BTC: [1F3NzZXUm4sATgCs3sgTqXHwrAqM4JnGVS](bitcoin:1F3NzZXUm4sATgCs3sgTqXHwrAqM4JnGVS) + Made with <3 by Nathan Adams \ No newline at end of file