~widelands-dev/widelands-website/django_staticfiles

416.2.1 by Holger Rapp
Added the apt-get update script I run every 30 days.
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
421 by Holger Rapp
Updated apt-get update script.
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
416.2.1 by Holger Rapp
Added the apt-get update script I run every 30 days.
16
apt-get update
421 by Holger Rapp
Updated apt-get update script.
17
stop wlwebsite || true
416.2.1 by Holger Rapp
Added the apt-get update script I run every 30 days.
18
421 by Holger Rapp
Updated apt-get update script.
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
416.2.2 by Holger Rapp
Remove -y on the apt-get update line.
24
apt-get dist-upgrade
416.2.1 by Holger Rapp
Added the apt-get update script I run every 30 days.
25
26
start wlwebsite
27
28
apt-get autoremove -y