~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to _ops/apt_update.sh

  • Committer: Holger Rapp
  • Date: 2009-02-21 18:24:02 UTC
  • Revision ID: sirver@kallisto.local-20090221182402-k3tuf5c4gjwslbjf
Main Page contains now the same informations as before

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# Updates all packages on the server, but stops the widelands website before
3
 
# doing so, in case mysql gets updated - it always results in really ugly
4
 
# errors for users otherwise. Ideally, this script would switch the website to
5
 
# a "In Maintenance" banner.
6
 
#
7
 
# This script requires root access.
8
 
 
9
 
set -ex
10
 
 
11
 
if [ -z "$STY" ] && [ -z "$TMUX" ]; then 
12
 
   echo "Run inside screen or tmux in case SSH gets updated."
13
 
   exit 1
14
 
fi
15
 
 
16
 
apt-get update
17
 
stop wlwebsite || true
18
 
 
19
 
# TODO(sirver): Upgrading widelands-data takes a long time (~30 minutes or
20
 
# longer). Use apt-mark hold to not update widelands and widelands-data to
21
 
# bring the website up quicker again. Then only upgrade those packages later,
22
 
# after the website is up again.
23
 
# See http://askubuntu.com/questions/99774/exclude-packages-from-apt-get-upgrade
24
 
apt-get dist-upgrade
25
 
 
26
 
start wlwebsite
27
 
 
28
 
apt-get autoremove -y