File: installcheck

package info (click to toggle)
pgmemcache 2.3.0-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 268 kB
  • sloc: ansic: 975; sql: 220; makefile: 62; sh: 33
file content (15 lines) | stat: -rwxr-xr-x 294 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

set -eux

if [ "$(id -u)" = "0" ]; then
	USER=$(stat -c %U .)
	if [ "$USER" = "root" ]; then
		USER="${SCHROOT_USER:-postgres}"
		chown -R $USER .
	fi
	echo "memcached won't start as root, switching to $USER"
	su $USER -c "pg_buildext installcheck"
else
	pg_buildext installcheck
fi