Create and host your own Script Pack - Bit Che 2.0Want to create an specialized Script Pack? Want your users to be able to fetch the latest version without having to download individual scripts?
This will help you sync a GitHub script pack to your own website and also provide the 'Update Check' for Bit Che.
For this example, the new Script Pack is named:
devtest1. First, clone the Bit Che 2.0 Script Pack at GitHub:
https://github.com/convivea/bit-che-2-scripts. You can also create your own without cloning, but follow the same Directory structure as our main github.
Note: if you clone then, the
'cache.ini' should not be included in your own script pack. ALSO, 'bcs.default.ini' needs to be renamed to 'bcs.name.ini' (name = your script pack name) and the Update URL should be updated (see
Step 7 below).
2. Download the file attached here: "GitHub-ScriptPack.zip"
3. Extract and Edit the important information in 'index.php':
$SecretKey = 'SecretKey2'; #set a password so no one else updates your Script Pack
$BaseURLGitHub = 'https ://github.com/convivea/bit-che-2-scripts'; #the base URL to your GitHub
$BaseURLScript = 'http://www.convivea.com/devtest/'; #the base URL to your website that has the 'index.php'
$ScriptZip = 'devtest.zip'; #what you want the script pack .zip to be named
4. Upload "index.php" to your website. Note: you can rename this to anything.
5.
IMPORTANT: Make sure the directory on your website that contains the attached 'index.php' is
CHMOD 775. The script needs to be able to write files (hash CRC32 for the scriptpack.zip, the scriptpack.zip, log file).
6. next, in GitHub, use the 'WebHook URL' under 'Adminstration | Service Hooks'
put in your URL to the script, for example:
http://www.convivea.com/devtest/index.php?pw=[YourSecretKey]
NOTE: Make sure you include
pw=[YourSecretKey] in your URL where
[YourSecretKey] equals what you put into the 'index.php' file under
$SecretKey = 'SecretKey2'; For our example, the URL would be:
http://www.convivea.com/devtest/index.php?pw=SecretKey2See the attached image for more information.
7. Next, setup the 'Bit Che Script Pack Config File' and put in your Bit Che
/scripts/ folder:
for example,
'bcs.devtest.ini' which follows the file name format 'bcs.name.ini' (name = your script pack name)
[pack]
hash=00000000
update=http://www.convivea.com/devtest/index.php?uid=bit&v=%VER%&s=%HASH%
enabled=1
note: notice we point the update URL to your website. also, make sure you add
?uid=bit&v=%VER%&s=%HASH% at the end of your URL.
8. add/update the file from
Step 7 into your GitHub script pack in the root directory (as our main GitHub has 'bcs.default.ini' as an example). There should only be one 'bcs.name.ini' file in your Script Pack.
9. Optional: (if you did not make a change to your GitHub in
Step 8) then, make an update to your GitHub script pack and then it will be automatically sent to your website.
10. launch Bit Che and update your new Script Pack, and enjoy!