/[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.1 by jpp, Wed Mar 31 04:12:02 2021 UTC Revision 1.5 by jpp, Fri Oct 22 02:13:38 2021 UTC
# Line 13  cat <<'EOF' > dir.list Line 13  cat <<'EOF' > dir.list
13  /etc/samba/secrets.tdb  /etc/samba/secrets.tdb
14  /etc/samba/smbpasswd  /etc/samba/smbpasswd
15  /etc/shadow  /etc/shadow
 /etc/smbpasswd  
16  /etc/ssh  /etc/ssh
17  /etc/sudoers  /etc/sudoers
18  /root  /root
# Line 33  cat <<'EOF' > dir.list Line 32  cat <<'EOF' > dir.list
32  /var/log/iptables/  /var/log/iptables/
33  /var/spool/mail/  /var/spool/mail/
34  /var/spool/spamd/  /var/spool/spamd/
35    /var/spool/cron/
36    EOF
37    
38    [ -e /etc/smbpasswd ] && cat <<'EOF' >> dir.list
39    /etc/smbpasswd
40    EOF
41    
42    [ -e /var/log/samba/samba_audit ] && cat <<'EOF' >> dir.list
43    /var/log/samba/samba_audit
44    EOF
45    
46    [ -e /etc/samba/schannel_store.tdb ] && cat <<'EOF' >> dir.list
47    /etc/samba/schannel_store.tdb
48    EOF
49    
50    [ -e /var/lib/samba/group_mapping.tdb ] && cat <<'EOF' >> dir.list
51    /var/lib/samba/group_mapping.tdb
52    EOF
53    
54    [ -e /var/lib/samba/account_policy.tdb ] && cat <<'EOF' >> dir.list
55    /var/lib/samba/account_policy.tdb
56  EOF  EOF
57    
58  [ -e /var/log/samba/samba_audit ] && cat <<'EOF' >> dir.list  [ -e /var/log/samba/samba_audit ] && cat <<'EOF' >> dir.list
# Line 68  EOF Line 88  EOF
88    
89  # search for local script added  # search for local script added
90  find /usr/local/bin/ -type f | xargs -I % sh -c "rpm -qf % 2>&1 > /dev/null || echo % >> dir.list"  find /usr/local/bin/ -type f | xargs -I % sh -c "rpm -qf % 2>&1 > /dev/null || echo % >> dir.list"
91    # search for local dir script added
92    find /usr/local/ -maxdepth 1  -type d | xargs -I % sh -c "rpm -qf % 2>&1 > /dev/null || echo % >> dir.list"
93  # search for cron files not owned by a rpm  # search for cron files not owned by a rpm
94  find /etc/cron.* -type f | xargs -I % sh -c "rpm -qf % 2>&1 > /dev/null || echo % >> dir.list"  find /etc/cron.* -type f | xargs -I % sh -c "rpm -qf % 2>&1 > /dev/null || echo % >> dir.list"
95  # search for udev rules not owned by a rpm ! oucl add an option there in case you change of hardware  # search for udev rules not owned by a rpm ! oucl add an option there in case you change of hardware
96  find /etc/udev/rules.d/ -type f | xargs -I % sh -c "rpm -qf % 2>&1 > /dev/null || echo % >> dir.list"  find /etc/udev/rules.d/ -type f | xargs -I % sh -c "rpm -qf % 2>&1 > /dev/null || echo % >> dir.list"
97    # search for spamassassin user created config
98    find /etc/mail/spamassassin -maxdepth 1 -type f | xargs -I % sh -c "rpm -qf % 2>&1 > /dev/null || echo % >> dir.list"
99    
100  ##################  ##################
101  #  #
# Line 137  rpm -q dokuwiki >/dev/null 2>&1 && for D Line 161  rpm -q dokuwiki >/dev/null 2>&1 && for D
161  done  done
162    
163    
164  rpm -q smeserver-dovecot >/dev/null  2>&1 && cat <<'EOF' >> dir.list  #rpm -q smeserver-dovecot >/dev/null  2>&1 && cat <<'EOF' >> dir.list
165    [ -e /etc/dovecot/sharemailbox ] && cat <<'EOF' >> dir.list
166  /etc/dovecot/sharemailbox/  /etc/dovecot/sharemailbox/
167  EOF  EOF
168    
# Line 165  rpm -q smeserver-freepbx >/dev/null 2>&1 Line 190  rpm -q smeserver-freepbx >/dev/null 2>&1
190  EOF  EOF
191  # smeserver-fail2ban  # smeserver-fail2ban
192  if [ -d /etc/fail2ban/action.d ]; then  if [ -d /etc/fail2ban/action.d ]; then
193    for F in /etc/fail2ban/action.d/*;do    for F in $(ls /etc/fail2ban/action.d/);do
194      rpm -qf $F >/dev/null 2>&1 || echo $F >> dir.list      rpm -qf /etc/fail2ban/action.d/$F >/dev/null 2>&1 || echo /etc/fail2ban/action.d/$F >> dir.list
195    done    done
196  fi  fi
197  if [ -d /etc/fail2ban/fail2ban.d ]; then  if [ -d /etc/fail2ban/fail2ban.d ]; then
198    for F in /etc/fail2ban/fail2ban.d/*;do    for F in $(ls /etc/fail2ban/fail2ban.d/);do
199      rpm -qf $F >/dev/null 2>&1 || echo $F >> dir.list      rpm -qf /etc/fail2ban/fail2ban.d/$F >/dev/null 2>&1 || echo /etc/fail2ban/fail2ban.d/$F >> dir.list
200    done    done
201  fi  fi
202  if [ -d /etc/fail2ban/filter.d ]; then  if [ -d /etc/fail2ban/filter.d ]; then
203    for F in /etc/fail2ban/filter.d/*;do    for F in $(ls /etc/fail2ban/filter.d/);do
204      rpm -qf $F >/dev/null 2>&1 || echo $F >> dir.list      rpm -qf /etc/fail2ban/filter.d/$F >/dev/null 2>&1 || echo /etc/fail2ban/filter.d/$F >> dir.list
205    done    done
206  fi  fi
207  if [ -d /etc/fail2ban/jail.d ]; then  if [ -d /etc/fail2ban/jail.d ]; then
208    for F in /etc/fail2ban/jail.d/*;do    for F in $(/etc/fail2ban/jail.d/);do
209      rpm -qf $F >/dev/null 2>&1 || echo $F >> dir.list      rpm -qf /etc/fail2ban/jail.d/$F >/dev/null 2>&1 || echo /etc/fail2ban/jail.d/$F >> dir.list
210    done    done
211  fi  fi
212  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 204  rpm -q smeserver-lemonldap-ng >/dev/null Line 229  rpm -q smeserver-lemonldap-ng >/dev/null
229  /var/lib/lemonldap-ng/notifications  /var/lib/lemonldap-ng/notifications
230  EOF  EOF
231  #smeserver-letsencrypt  #smeserver-letsencrypt
232  rpm -q smeserver-letsencrypt  >/dev/null  2>&1 && cat <<'EOF' >> dir.list  #rpm -q smeserver-letsencrypt  >/dev/null  2>&1 && cat <<'EOF' >> dir.list
233    [ -d /etc/letsencrypt.sh/ ]  && cat <<'EOF' >> dir.list
234  /etc/letsencrypt.sh/  /etc/letsencrypt.sh/
235    EOF
236    [ -d /etc/dehydrated/ ] && cat <<'EOF' >> dir.list
237  /etc/dehydrated/  /etc/dehydrated/
238  EOF  EOF
239    
240  rpm -q smeserver-limesurvey >/dev/null 2>&1 && cat <<'EOF' >> dir.list  rpm -q smeserver-limesurvey >/dev/null 2>&1 && cat <<'EOF' >> dir.list
241  /var/lib/limesurvey/uploads  /var/lib/limesurvey/uploads
242  EOF  EOF


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