1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2025-09-13 15:59:28 +00:00

add custom commands to misc script

This commit is contained in:
Norbert Varzariu
2016-01-22 15:01:32 +01:00
parent eb643443fd
commit 86073f42b1
6 changed files with 67 additions and 15 deletions

View File

@@ -1,10 +1,6 @@
#!/bin/bash
# add custom stuff here
# FIXME: remember to concat for custom stuff after the last line of the puppet generated script
<% if @osfamily == 'RedHat' -%>
ssh <%=@host-%> rpm -qa --qf='%{name},' > packages.txt
<%@commands.each do |command| -%>
ssh <%=@host-%> '<%=command-%>'
<%end-%>
#
#
#
# ++++++++++++++++++++++++++++++++++++++++++++

View File

@@ -22,6 +22,8 @@ for db in "${dbs[@]}"; do
ssh -l root "$host" "<%=@dumper-%> --user=<%=@dbbackup_user-%> --password='<%=@dbbackup_password-%>' <%=@dump_flags-%> ${db}" > "$db".sql
<%end-%>
wait
pbzip2 "$db".sql
<% if @compress != '' -%>
<%=@compress-%> "$db".sql
<%end-%>
done

View File

@@ -13,6 +13,8 @@ dbs=(
for db in "${dbs[@]}"; do
ssh -l root "$host" "<%=@dumper-%> -U ${user} <%=@dump_flags-%> ${db}" > "$db".sql
wait
pbzip2 "$db".sql
<% if @compress != '' -%>
<%=@compress-%> "$db".sql
<%end-%>
done