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 (24 years, 2 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
include handling of httpd level

#!/usr/bin/perl

# loncapaautoupgrade

# This tool does "all the things" to auto update a system.
# Use with extreme caution so that you do not lose your
# work.

# Scott Harrison, 10/25/2000

use strict;

# Download most recent LON-CAPA RPM

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`;

# Stop LON-CAPA

print "Stopping LON-CAPA and Apache\n";
system("/etc/rc.d/init.d/loncontrol stop");
system("/etc/rc.d/init.d/httpd stop");

# Update downloaded RPM

print `/bin/rpm -Uvh --force /tmp/LON-CAPA-base-3.1-1.i386.rpm`;

# Restore configuration values

print `/usr/sbin/loncaparestoreconfigurations`;

# Start LON-CAPA

print "Starting LON-CAPA and Apache (be patient please)\n";
system("/etc/rc.d/init.d/loncontrol start");
system("/etc/rc.d/init.d/httpd start");

# Verify base files and packages

print `/usr/sbin/loncapaverify`;

# Remove downloaded RPM

print `/bin/rm -f /tmp/LON-CAPA-base-3.1-1.i386.rpm`;


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