X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=backup.sh;h=57cb9e39e5a1faeff74e6f36244a9d35163413b2;hb=82b142aa2d3c809bde0bfdf003890aa0097b232d;hp=9737f8c7668d3bf8cb55e7c2145a5ff6179b0ed7;hpb=e0d5ede94ac7c62d827d8d5d3b27927ada294183;p=scripts%2Fscripts.git diff --git a/backup.sh b/backup.sh index 9737f8c..57cb9e3 100755 --- a/backup.sh +++ b/backup.sh @@ -85,7 +85,7 @@ for i in $kernel_num; do done mkdir ./etc -for i in init.d conf opt ppp cups; do +for i in init.d conf opt ppp cups udev cron.d; do if [ -d /etc/$i ] ; then echo "copying /etc/$i" cp -r /etc/$i ./etc @@ -95,7 +95,7 @@ done for i in dhcpd.conf fstab hosts host.conf hosts.allow hosts.deny lilo.conf \ profile sendmail.cf resolv.conf exports fb.modes inetd.conf \ xinetd.conf mp3user mp3db.conf modules.conf named.conf \ - modprobe.devfs modprobe.conf devfsd.conf ; do + modprobe.devfs modprobe.conf devfsd.conf crontab; do if [ -f /etc/$i ] ; then echo "copying /etc/$i" cp /etc/$i ./etc @@ -107,6 +107,11 @@ if [ -f /etc/X11/XF86Config ] ; then echo "copying /etc/X11/XF86Config*" cp /etc/X11/XF86Config* ./etc/X11 fi +if [ -f /etc/X11/xorg.conf ] ; then + mkdir -p ./etc/X11 + echo "copying /etc/X11/xorg.conf*" + cp /etc/X11/xorg.conf* ./etc/X11 +fi # specific config stuff @@ -130,6 +135,11 @@ if [ "$host" = "gate" ] ; then mkdir -p ./ircd [ -f /etc/opt/unrealircd/unrealircd.conf ] && \ cp /etc/opt/unrealircd/unrealircd.conf ./ircd + + # minimalist stuff + mkdir -p ./minimalist + [ -f /etc/opt/minimalist/minimalist.conf ] && \ + cp /etc/opt/minimalist/minimalist.conf ./minimalist fi # right-hand specific config stuff @@ -139,6 +149,10 @@ if [ "$host" = "right-hand" ] ; then echo "copying dns data" cp -r /var/named/* ./named fi + if [ -f /etc/opt/apache*/httpd.conf ] ; then + mkdir ./apache + cp /etc/opt/apache*/httpd.conf ./apache + fi fi @@ -175,20 +189,24 @@ if [ "$host" = "hackstation" -o "$host" = "mobile" -o "$host" = "hdw" -o "$host" # home of hackbard mkdir -p ./home/hackbard - echo "copying home" + echo -n "copying home ..." for i in temp test; do + echo -n " $i," [ -d /home/hackbard/$i ] && \ cp -r /home/hackbard/$i ./home/hackbard done for i in xinitrc_evil xinitrc_wm .xinitrc GNUstep .Xauthority \ - .Xdefaults .XHkeys .signature .directfbrc .bashrc ; do + .Xdefaults .XHkeys .signature .directfbrc .bashrc \ + sp12 .licq .irssi; do + echo -n " $i," [ -e /home/hackbard/$i ] && \ cp -r /home/hackbard/$i ./home/hackbard done - if [ -d /home/hackbard/.mozilla ] && - cp /home/hackbard/.mozilla/default/*/bookmarks.html \ + [ -d /home/hackbard/.mozilla ] && + cp /home/hackbard/.mozilla/*/*/bookmarks.html \ mozilla-bookmarks.html [ -d /home/hackbard/.ssh ] && cp -r /home/hackbard/.ssh ./home/hackbard + echo " done." # tftpboot if [ -d /tftpboot ] ; then