~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to _ops/apt_update.sh

  • Committer: Holger Rapp
  • Date: 2019-06-21 18:34:42 UTC
  • mfrom: (540.1.3 update_ops_script)
  • Revision ID: sirver@gmx.de-20190621183442-y2ulybzr0rdvfefd
Adapt the update script for the new server.

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.
 
5
#
 
6
# This script requires sudo.
 
7
 
 
8
set -ex
 
9
 
 
10
if [ -z "${TMUX}" ]; then 
 
11
   echo "Run inside screen or tmux in case SSH gets updated."
 
12
   exit 1
 
13
fi
 
14
 
 
15
sudo apt update
 
16
 
 
17
sudo systemctl stop wl-website
 
18
 
 
19
sudo apt dist-upgrade
 
20
 
 
21
sudo systemctl start wl-website
 
22
 
 
23
sudo apt autoremove -y