/[smecontribs]/rpms/smeserver-migratehelper/contribs10/migratehelper.sh
ViewVC logotype

Diff of /rpms/smeserver-migratehelper/contribs10/migratehelper.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.6 by jcrisp, Sat Nov 13 14:52:01 2021 UTC Revision 1.13 by jpp, Tue Mar 7 04:44:47 2023 UTC
# Line 118  cat <<'EOF' >dir.list Line 118  cat <<'EOF' >dir.list
118  /etc/sudoers  /etc/sudoers
119  /root  /root
120  /home/e-smith/Maildir  /home/e-smith/Maildir
 /home/e-smith/home  
121  /home/e-smith/ssl.crt  /home/e-smith/ssl.crt
122  /home/e-smith/ssl.key  /home/e-smith/ssl.key
123  /home/e-smith/dkim_keys  /home/e-smith/dkim_keys
# Line 289  rpm -q smeserver-freepbx >/dev/null 2>&1 Line 288  rpm -q smeserver-freepbx >/dev/null 2>&1
288  /usr/sbin/amportal  /usr/sbin/amportal
289  /usr/sbin/fwconsole  /usr/sbin/fwconsole
290  EOF  EOF
291  # smeserver-fail2ban  # smeserver-fail2ban
292  if [ -d /etc/fail2ban/action.d ]; then  if [ -d /etc/fail2ban/action.d ]; then
293    for F in /etc/fail2ban/action.d/*; do    for F in $(ls /etc/fail2ban/action.d/);do
294      rpm -qf /etc/fail2ban/action.d/"$F" >/dev/null 2>&1 || echo /etc/fail2ban/action.d/"$F" >>dir.list      rpm -qf /etc/fail2ban/action.d/$F >/dev/null 2>&1 || echo /etc/fail2ban/action.d/$F >> dir.list
295    done    done
296  fi  fi
297  if [ -d /etc/fail2ban/fail2ban.d ]; then  if [ -d /etc/fail2ban/fail2ban.d ]; then
298    for F in /etc/fail2ban/fail2ban.d*; do    for F in $(ls /etc/fail2ban/fail2ban.d/);do
299      rpm -qf /etc/fail2ban/fail2ban.d/"$F" >/dev/null 2>&1 || echo /etc/fail2ban/fail2ban.d/"$F" >>dir.list      rpm -qf /etc/fail2ban/fail2ban.d/$F >/dev/null 2>&1 || echo /etc/fail2ban/fail2ban.d/$F >> dir.list
300    done    done
301  fi  fi
302  if [ -d /etc/fail2ban/filter.d ]; then  if [ -d /etc/fail2ban/filter.d ]; then
303    for F in /etc/fail2ban/filter.d/*; do    for F in $(ls /etc/fail2ban/filter.d/);do
304      rpm -qf /etc/fail2ban/filter.d/"$F" >/dev/null 2>&1 || echo /etc/fail2ban/filter.d/"$F" >>dir.list      rpm -qf /etc/fail2ban/filter.d/$F >/dev/null 2>&1 || echo /etc/fail2ban/filter.d/$F >> dir.list
305    done    done
306  fi  fi
307  if [ -d /etc/fail2ban/jail.d ]; then  if [ -d /etc/fail2ban/jail.d ]; then
308    for F in /etc/fail2ban/jail.d/*; do    for F in $(ls /etc/fail2ban/jail.d/);do
309      rpm -qf /etc/fail2ban/jail.d/"$F" >/dev/null 2>&1 || echo /etc/fail2ban/jail.d/"$F" >>dir.list      rpm -qf /etc/fail2ban/jail.d/$F >/dev/null 2>&1 || echo /etc/fail2ban/jail.d/$F >> dir.list
310    done    done
311  fi  fi
312  rpm -q smeserver-grr >/dev/null 2>&1 && cat <<'EOF' >>dir.list  rpm -q smeserver-grr >/dev/null 2>&1 && cat <<'EOF' >>dir.list
# Line 409  EOF Line 408  EOF
408  rpm -q smeserver-sme9admin >/dev/null 2>&1 && cat <<'EOF' >>dir.list  rpm -q smeserver-sme9admin >/dev/null 2>&1 && cat <<'EOF' >>dir.list
409  /var/lib/sme9admin/  /var/lib/sme9admin/
410  EOF  EOF
411    rpm -q smeserver-smeadmin >/dev/null 2>&1 && cat <<'EOF' >>dir.list
412    /var/lib/smeadmin/
413    EOF
414    #softethernet
415    rpm -q softethervpn >/dev/null 2>&1 && cat <<'EOF' >>dir.list
416    /usr/vpnserver/vpn_server.config
417    /usr/vpnserver/backup.vpn_server.config
418    /usr/vpnserver/chain_certs
419    /usr/vpnserver/packet_log
420    /usr/vpnserver/security_log
421    /usr/vpnserver/server_log
422    EOF
423  #smeserver-sysmon  #smeserver-sysmon
424  rpm -q smeserver-sysmon >/dev/null 2>&1 && cat <<'EOF' >>dir.list  rpm -q smeserver-sysmon >/dev/null 2>&1 && cat <<'EOF' >>dir.list
425  /var/lib/rrd/  /var/lib/rrd/
# Line 436  EOF Line 447  EOF
447  rpm -q smeserver-webfilter >/dev/null 2>&1 && cat <<'EOF' >>dir.list  rpm -q smeserver-webfilter >/dev/null 2>&1 && cat <<'EOF' >>dir.list
448  /var/squidGuard/blacklists/  /var/squidGuard/blacklists/
449  EOF  EOF
450  #smeserver-webshares  #smeserver-webshare
451  rpm -q smeserver-webshares >/dev/null 2>&1 && cat <<'EOF' >>dir.list  rpm -q smeserver-webshare >/dev/null 2>&1 && cat <<'EOF' >>dir.list
452  /opt/webshare  /opt/webshare
453  EOF  EOF
454  # smeserver-zabbix-server smeserver-zabbix-agent smeserver-zabbix-proxy  # smeserver-zabbix-server smeserver-zabbix-agent smeserver-zabbix-proxy
# Line 517  echo "cd /root/migratehelper/yumDownload Line 528  echo "cd /root/migratehelper/yumDownload
528    
529  if [ $TEST = "n" ]; then  if [ $TEST = "n" ]; then
530    echo "Stopping Services and running backup"    echo "Stopping Services and running backup"
531    echo "Test $TEST"  
532    exit 1    # uncomment to test Test and prevent backup running
533      # echo "Test mode $TEST"
534      # exit 1
535    
536    #### stop services so no changes occurs    #### stop services so no changes occurs
537    if [ -e /usr/lib/systemd/system/qmail.service ]; then    if [ -e /usr/lib/systemd/system/qmail.service ]; then
# Line 546  if [ $TEST = "n" ]; then Line 559  if [ $TEST = "n" ]; then
559    
560  else  else
561    echo "Test mode enabled - no backup run"    echo "Test mode enabled - no backup run"
562    echo "Test $TEST"    echo "Test mode $TEST"
563    exit 0    exit 0
564  fi  fi
565    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed