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:
@@ -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-%>
|
||||
#
|
||||
#
|
||||
#
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user