This module simply loads and saves the nodes, it increases by 1 second the creation date and by only 5 the "last updated" on nodes.
Version: 1.3
#!/bin/sh | |
# Some helper commands | |
# Get the container id based on a pid child process | |
ps faux | grep -C10 $MY_PID | grep "docker-containerd-shim" | |
# Given a container name gets the APP_NAME | |
# For example: $MY_CONTAINER_NAME="k8s_web-backend.416e49d_web-backend-5f3qk_bb561cbf-f330-4188-be92-2ea9f607b71f_69f3bc6a-e240-11e6-ab50-5efaafd16bc4_8950f42d" | |
docker exec -ti $(docker inspect --format="{{.ID}}:{{.Name}}" $(docker ps -aq --no-trunc) | grep $MY_CONTAINER_NAME | cut -f1 -d':') /usr/bin/env | grep APP_NAME | |
# Simplified version |
varnishlog -aAD -w ./varnish-ban.log -P ./varnish-ban.pid -g raw -q "CLI ~ 'Rd ban obj.*'" |
# Update Drupal modules on composer-based setups | |
comp-drup() { | |
if [ -z "$1" ]; then echo -e "\e[31m[ERR] You MUST specify a module name\e[0m" 1>&2; return -1; fi; | |
if [ ! -f ./composer.json ]; then echo -e "\e[31m[ERR] Missing composer.json file. Are you sure you're in the correct directory? \e[0m" 1>&2; return -2; fi; | |
composer update "drupal/$1" --with-dependencies | |
} |
<?php | |
# [...] All your config | |
/* Composer Manager configuration */ | |
$conf['composer_manager_vendor_dir'] = realpath(DRUPAL_ROOT .'/../vendor'); | |
$conf['composer_manager_file_dir'] = realpath(DRUPAL_ROOT .'/..'); | |
# [...] more stuff |
#!/bin/sh | |
# | |
# Argument 1: Source drush-based drupal | |
# Argument 2: Destination composer-based drupal | |
# | |
OLD_ROOT=$1 | |
NEW_ROOT=$2 | |
if [ ! -d "$OLD_ROOT" ]; then | |
echo "Source directory not found!" |
# This is a Drupal Console (chain file)[https://docs.drupalconsole.com/en/commands/chain.html]. | |
# Needs to be deployed in `~/.console/chain` directory. | |
# Can be be run using `drupal chain --file=~/.console/chain/deploy-config.yml`. | |
# | |
# The purpouse if this chain is to remove "devel-only" modules and config from the configuration | |
# export, so that we can avoid issues in the syncronisation in Staging/Production. | |
# | |
commands: | |
# Remove 'devel' modules | |
- command: module:uninstall |
#!/bin/sh | |
# | |
# Checks if a server is running, otherwise it restarts it | |
SERVER=$1 | |
if [ -z "$SERVER" ]; then | |
echo "Server name not provided!" 1>&2 | |
exit 1 | |
fi |
<?php | |
$all = $platforms = array(); | |
// Use standard linux 'PATH' style, so if you need more entries separate them using a column ':' char | |
// For example: '/path/to/platforms/container' OR '/path/to/platforms/container:/path/to/another/location' | |
// This dorectory will contain one or more drupal roots directories | |
$platforms_path = '/var/www/platforms'; | |
$paths = explode(':', $platforms_path); | |
foreach($paths as $path) { |
This module simply loads and saves the nodes, it increases by 1 second the creation date and by only 5 the "last updated" on nodes.
Version: 1.3
#!/bin/sh | |
# | |
# Creates a new RamsaltMedia platform and sets it up with Esolitos' default configuration. | |
# | |
DRUSH=`which drush` | |
if [ -z $DRUSH ]; then | |
echo "ERROR: drush command not found!" 1>&2 | |
exit -1 | |
fi; |