py_test1

by pyarza
13 deployments · 5 still active · last rev. 6 months ago

Compatible with: Ubuntu 14.04 LTS
Includes: StackScript Bash Library · private-script
						#!/bin/bash

# Variables
# <UDF name="username" default="user"     label="Login username" example="user1" />
# <UDF name="password" default=""         label="Login password" example="" />
# <UDF name="hostname" default="linode1"  label="Server Hostname">

#Librerias de rutinas/utilidades
source <ssinclude StackScriptID=1>   #
source <ssinclude StackScriptID=17544>   #

#Configuracion consola de salida
set -e  # si fall salir
set -u  # expandir variable no existente
#set -x  # algo de debug
exec &> /root/registro_stackscript.log

log_line
log "START"
log_line
log "OS:"
lsb_release -d


log_line
log "1. Cambiar nombre maquina"
system_update_hostname "$HOSTNAME"

log_line
log "2. AƱadir usuario"
system_add_user "$USERNAME" "$PASSWORD" "sudo"

log_line
log "3. Forzar IP4"
forzar_ip4

log_line
log "4. Actualizar S.O."
system_update
log "S.O. actualizado. Ahora es:"
lsb_release -d

log_line
log "5. Instalar PG+PG (9.5/2.2)"
install_postgres_postgis
psql --version

log_line
log "99. Fin"