File: gm-fixup_server

package info (click to toggle)
gnumed-server 22.5-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 46,356 kB
  • sloc: sql: 1,216,324; python: 14,261; sh: 1,497; makefile: 20
file content (28 lines) | stat: -rwxr-xr-x 996 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

#==============================================================
# This wrapper is intended to be installed into a systemwide
# admin-only executable directory such as "/usr/sbin/"
#
# It should be run as root and will call the upstream script
# to actually apply fixes to an existing database.
#
# author: Andreas Tille, Karsten Hilbert
# license: GPL v2 or later
#
#==============================================================
# those probably need some adjustment from package maintainers:

GM_LOG_BASE="/var/log/gnumed/server"
GM_SERVER_DIR="/var/lib/gnumed/server/bootstrap"

#==============================================================
# do not run twice
[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock --exclusive --nonblock "$0" "$0" "$@" || :

cd ${GM_SERVER_DIR} || ( echo "=> Cannot change into ${GM_SERVER_DIR}. Aborting." ; exit 1 )
mkdir -p ${GM_LOG_BASE}
export GM_LOG_BASE
./fixup-db.sh "$@"

#==============================================================