initial commit of file from CVS for smeserver-affa on Tue 10 Sep 11:19:50 BST 2024
This commit is contained in:
14
root/etc/affa/scripts/SME/backupList.pl
Executable file
14
root/etc/affa/scripts/SME/backupList.pl
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/perl
|
||||
use esmith::Backup;
|
||||
my $b = new esmith::Backup or die 'Error';
|
||||
my @list = $b->restore_list;
|
||||
|
||||
foreach my $dir (@list){
|
||||
$dir = "/$dir";
|
||||
push (@newList, $dir);
|
||||
}
|
||||
|
||||
print (join ',', @newList);
|
||||
|
||||
exit;
|
||||
|
5
root/etc/affa/scripts/SME/backupList.sh
Executable file
5
root/etc/affa/scripts/SME/backupList.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
VALUE=$(/usr/bin/perl -w /tmp/backupList.pl)
|
||||
echo $VALUE
|
||||
|
3
root/etc/affa/scripts/SME/signal-post-backup
Executable file
3
root/etc/affa/scripts/SME/signal-post-backup
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
/sbin/e-smith/signal-event post-backup
|
||||
|
3
root/etc/affa/scripts/SME/signal-post-upgrade-reboot
Executable file
3
root/etc/affa/scripts/SME/signal-post-upgrade-reboot
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
/sbin/e-smith/signal-event post-upgrade
|
||||
/sbin/e-smith/signal-event reboot
|
3
root/etc/affa/scripts/SME/signal-pre-backup
Executable file
3
root/etc/affa/scripts/SME/signal-pre-backup
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
/sbin/e-smith/signal-event pre-backup desktop
|
||||
|
2
root/etc/affa/scripts/SME/signal-pre-restore
Executable file
2
root/etc/affa/scripts/SME/signal-pre-restore
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
/sbin/e-smith/signal-event pre-restore desktop
|
10
root/etc/affa/scripts/mysql-dump-tables
Executable file
10
root/etc/affa/scripts/mysql-dump-tables
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /tmp/MySQL-Dumps
|
||||
chmod 700 /tmp/MySQL-Dumps
|
||||
for db in $(mysql -BNre "show databases;")
|
||||
do
|
||||
mysqldump --add-drop-table --single-transaction -QB "$db" -r /tmp/MySQL-Dumps/"$db".dump || exit 1
|
||||
chmod 400 /tmp/MySQL-Dumps/"$db".dump
|
||||
done
|
||||
exit 0
|
14
root/etc/affa/scripts/postscript-sample.pl
Executable file
14
root/etc/affa/scripts/postscript-sample.pl
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
|
||||
(my $hostname, my $job, my $sshCmd) = @ARGV;
|
||||
|
||||
# output is written to the log
|
||||
print "postJobCommand script postscript-sample.pl\n";
|
||||
print "hostname=$hostname\n";
|
||||
print "job=$job\n";
|
||||
print "sshCmd=$sshCmd\n";
|
||||
system("$sshCmd $hostname df");
|
||||
|
||||
exit 0;
|
13
root/etc/affa/scripts/postscriptRemote-sample.pl
Executable file
13
root/etc/affa/scripts/postscriptRemote-sample.pl
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
|
||||
(my $hostname, my $job) = @ARGV;
|
||||
|
||||
# output is written to the log
|
||||
print "postJobCommandRemote script postscriptRemote-sample.pl\n";
|
||||
print "hostname=$hostname\n";
|
||||
print "job=$job\n";
|
||||
system("df");
|
||||
|
||||
exit 0;
|
14
root/etc/affa/scripts/prescript-sample.pl
Executable file
14
root/etc/affa/scripts/prescript-sample.pl
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
|
||||
(my $hostname, my $job, my $sshCmd) = @ARGV;
|
||||
|
||||
# output is written to the log
|
||||
print "preJobCommand script prescript-sample.pl\n";
|
||||
print "hostname=$hostname\n";
|
||||
print "job=$job\n";
|
||||
print "sshCmd=$sshCmd\n";
|
||||
system("$sshCmd $hostname ls -l /var");
|
||||
|
||||
exit 0;
|
13
root/etc/affa/scripts/prescriptRemote-sample.pl
Executable file
13
root/etc/affa/scripts/prescriptRemote-sample.pl
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
|
||||
(my $hostname, my $job) = @ARGV;
|
||||
|
||||
# output is written to the log
|
||||
print "preJobCommandRemote script prescriptRemote-sample.pl\n";
|
||||
print "hostname=$hostname\n";
|
||||
print "job=$job\n";
|
||||
system("ls -l /var");
|
||||
|
||||
exit 0;
|
5
root/etc/affa/scripts/yum_install_packages.sh
Executable file
5
root/etc/affa/scripts/yum_install_packages.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
mkdir -p /tmp/yum-install
|
||||
echo -n "yum install " > /tmp/yum-install/install_all.$$
|
||||
yum list installed |grep -v "^ "|sed -e 's/ .*//' | grep "\."| sed -e 's/\..*//' | tr '\n' ' ' >> /tmp/yum-install/install_all.$$
|
||||
mv /tmp/yum-install/install_all.$$ /tmp/yum-install/install_all
|
Reference in New Issue
Block a user