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 | |
# MySQL root password | |
ROOTPASS="password" | |
TIMEZONE="Europe/Moscow" | |
MYSQLPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
SFTPPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
############## |
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 | |
echo "Enter username" | |
read USERNAME | |
############## | |
echo "Updating MODx" | |
cd /var/www/$USERNAME/www/ |
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 | |
switch($modx->event->name){ | |
case 'OnManagerPageInit': | |
$JS = <<<JS | |
<script type="text/javascript"> | |
Ext.onReady(function(){ | |
// Get a tree | |
var tree = Ext.getCmp('modx-resource-tree'); |
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 | |
// provider id => array of packages | |
$listPackagesToInstall = array( | |
1 => array( // standart modx provider | |
'sdStore' | |
, 'translit' | |
, 'SanitizeUpload' | |
, 'TinyMCE' | |
, 'FormIt' |
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 | |
$siteName = $modx->getOption('siteName', $scriptProperties, $modx->getOption('site_name')); // Имя сайта | |
$companyName = $modx->getOption('companyName', $scriptProperties, $modx->getOption('site_name')); // Компания | |
$bid = $modx->getOption('bid', $scriptProperties, 10); // Цена за клик | |
$siteUrl = $modx->makeUrl($modx->getOption('site_start'), '', '', 'full'); // Ссылка на главную страницу сайта | |
$descTpl = strip_tags($modx->getOption('descTpl', $scriptProperties, '[[+description]]')); // Шаблон для описания товара, без html | |
$paramCurrency = $modx->getOption('paramCurrency', $scriptProperties, 'RUR'); // Валюта | |
$paramDelivery = $modx->getOption('paramDelivery', $scriptProperties, true); // Доставка, по умолчанию - да. Можно указать имя параметра. | |
////////////////////////////////////////////////////////////////////////////// |