File:  [LON-CAPA] / loncom / build / Attic / loncapaautoupgrade
Revision 1.4: download - view: text, annotated - select for diffs
Fri Oct 27 18:06:31 2000 UTC (23 years, 9 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
include handling of httpd level

    1: #!/usr/bin/perl
    2: 
    3: # loncapaautoupgrade
    4: 
    5: # This tool does "all the things" to auto update a system.
    6: # Use with extreme caution so that you do not lose your
    7: # work.
    8: 
    9: # Scott Harrison, 10/25/2000
   10: 
   11: use strict;
   12: 
   13: # Download most recent LON-CAPA RPM
   14: 
   15: print `/usr/bin/lynx -term xterm -source http://install.lon-capa.org/3.1/loncapafiles/LON-CAPA-base-3.1-1.i386.rpm > /tmp/LON-CAPA-base-3.1-1.i386.rpm`;
   16: 
   17: # Stop LON-CAPA
   18: 
   19: print "Stopping LON-CAPA and Apache\n";
   20: system("/etc/rc.d/init.d/loncontrol stop");
   21: system("/etc/rc.d/init.d/httpd stop");
   22: 
   23: # Update downloaded RPM
   24: 
   25: print `/bin/rpm -Uvh --force /tmp/LON-CAPA-base-3.1-1.i386.rpm`;
   26: 
   27: # Restore configuration values
   28: 
   29: print `/usr/sbin/loncaparestoreconfigurations`;
   30: 
   31: # Start LON-CAPA
   32: 
   33: print "Starting LON-CAPA and Apache (be patient please)\n";
   34: system("/etc/rc.d/init.d/loncontrol start");
   35: system("/etc/rc.d/init.d/httpd start");
   36: 
   37: # Verify base files and packages
   38: 
   39: print `/usr/sbin/loncapaverify`;
   40: 
   41: # Remove downloaded RPM
   42: 
   43: print `/bin/rm -f /tmp/LON-CAPA-base-3.1-1.i386.rpm`;
   44: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>