/[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.9 by jcrisp, Sun Nov 14 14:12:30 2021 UTC
# Line 289  rpm -q smeserver-freepbx >/dev/null 2>&1 Line 289  rpm -q smeserver-freepbx >/dev/null 2>&1
289  /usr/sbin/amportal  /usr/sbin/amportal
290  /usr/sbin/fwconsole  /usr/sbin/fwconsole
291  EOF  EOF
292  # smeserver-fail2ban  # smeserver-fail2ban
293  if [ -d /etc/fail2ban/action.d ]; then  if [ -d /etc/fail2ban/action.d ]; then
294    for F in /etc/fail2ban/action.d/*; do    for F in $(ls /etc/fail2ban/action.d/);do
295      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
296    done    done
297  fi  fi
298  if [ -d /etc/fail2ban/fail2ban.d ]; then  if [ -d /etc/fail2ban/fail2ban.d ]; then
299    for F in /etc/fail2ban/fail2ban.d*; do    for F in $(ls /etc/fail2ban/fail2ban.d/);do
300      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
301    done    done
302  fi  fi
303  if [ -d /etc/fail2ban/filter.d ]; then  if [ -d /etc/fail2ban/filter.d ]; then
304    for F in /etc/fail2ban/filter.d/*; do    for F in $(ls /etc/fail2ban/filter.d/);do
305      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
306    done    done
307  fi  fi
308  if [ -d /etc/fail2ban/jail.d ]; then  if [ -d /etc/fail2ban/jail.d ]; then
309    for F in /etc/fail2ban/jail.d/*; do    for F in $(ls /etc/fail2ban/jail.d/);do
310      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
311    done    done
312  fi  fi
313  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 517  echo "cd /root/migratehelper/yumDownload Line 517  echo "cd /root/migratehelper/yumDownload
517    
518  if [ $TEST = "n" ]; then  if [ $TEST = "n" ]; then
519    echo "Stopping Services and running backup"    echo "Stopping Services and running backup"
520    echo "Test $TEST"  
521    exit 1    # uncomment to test Test and prevent backup running
522      # echo "Test mode $TEST"
523      # exit 1
524    
525    #### stop services so no changes occurs    #### stop services so no changes occurs
526    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 548  if [ $TEST = "n" ]; then
548    
549  else  else
550    echo "Test mode enabled - no backup run"    echo "Test mode enabled - no backup run"
551    echo "Test $TEST"    echo "Test mode $TEST"
552    exit 0    exit 0
553  fi  fi
554    


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