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
#!/bin/bash | |
## | |
## Checks that ssh on a host is not accessible. | |
## | |
/usr/lib/nagios/plugins/check_ssh -t 5 $1 | |
FOO=$? | |
# a non-zero output means that it failed, which is what we want |
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
api = 2 | |
core = 8.x | |
projects[] = "drupal" | |
libraries[civicrm][type] = "library" | |
libraries[civicrm][directory_name] = "civicrm" | |
libraries[civicrm][download][type] = "get" | |
libraries[civicrm][download][url] = "http://downloads.sourceforge.net/project/civicrm/civicrm-stable/4.7.3/civicrm-4.7.3-drupal.tar.gz" |
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
--- civicrm-version.php 2016-03-06 17:02:28.692925000 -0500 | |
+++ civicrm-version.php 2016-03-06 17:17:46.104925000 -0500 | |
@@ -1,7 +1,7 @@ | |
<?php | |
function civicrmVersion( ) { | |
return array( 'version' => '4.7.3', | |
- 'cms' => 'Drupal', | |
+ 'cms' => 'Drupal8', | |
'revision' => '7ad5c1d6a1' ); | |
} |
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
--- civicrm.install 2016-03-06 17:25:00.000000000 -0500 | |
+++ civicrm.install 2016-03-06 15:53:55.304925000 -0500 | |
@@ -117,7 +117,7 @@ | |
function _civicrm_find_civicrm() { | |
// Only acceptable location for civicrm is in /libraries/civicrm | |
- $path = \Drupal::root() . '/libraries/civicrm'; | |
+ $path = \Drupal::root() . '/modules/civicrm'; | |
if (file_exists($path . '/CRM/Core/ClassLoader.php')) { | |
return realpath($path); |
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
<?php | |
civicrm_initialize(); | |
$dao = CRM_Core_DAO::executeQuery('SELECT * FROM civicrm_custom_field'); | |
while ($dao->fetch()) { | |
$table_name = CRM_Core_DAO::singleValueQuery('SELECT table_name FROM civicrm_custom_group WHERE id = %1', array(1 => array($dao->custom_group_id, 'Integer'))); | |
$group_title = CRM_Core_DAO::singleValueQuery('SELECT title FROM civicrm_custom_group WHERE id = %1', array(1 => array($dao->custom_group_id, 'Integer'))); |
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
// w.i.p. | |
// Based on : https://github.com/TechToThePeople/ldapcivi | |
var ldap = require('ldapjs'); | |
var _ = require('underscore'); | |
var settings = {}; | |
if (process.argv.length >= 3) { | |
console.log ("Using config file config/" + process.argv[2] + '.js'); |
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
<?php | |
// Set this to the CiviCRM DB name | |
$db_name = 'XXXX'; | |
civicrm_initialize(); | |
$sql = "SELECT TABLE_NAME, COLUMN_NAME, CHARACTER_MAXIMUM_LENGTH | |
FROM INFORMATION_SCHEMA.COLUMNS | |
WHERE DATA_TYPE IN ('varchar') |
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
/*!40101 SET NAMES utf8 */; | |
/******************************************************* | |
* | |
* civicrm_county | |
* | |
*******************************************************/ | |
SET FOREIGN_KEY_CHECKS=0; | |
REPLACE INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1001", "Afghanistan", "AF", "4", "0"); |
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
var settings = {} | |
settings.civicrm = {}, | |
settings.civicrm.server = "https://crm.example.coop", | |
settings.civicrm.path = "/sites/all/modules/civicrm/extern/rest.php", | |
settings.civicrm.api_key = "[api key of a user]", | |
settings.civicrm.key = "[civicrm site key]", | |
// Map usernames to Drupal uid | |
settings.mapping = { |
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
civicrm_api3('Setting', 'create', [ | |
'lcMessages' => 'en_US', | |
'languageLimit' => [ | |
'en_US' => 1, | |
], | |
]); | |
CRM_Core_I18n_Schema::makeMultilingual('en_US'); | |
global $dbLocale; |