File: cyphesis-cpp.postrm

package info (click to toggle)
cyphesis-cpp 0.6.2-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,752 kB
  • sloc: cpp: 94,194; xml: 40,196; python: 8,717; sh: 4,164; makefile: 1,968; ansic: 753
file content (13 lines) | stat: -rw-r--r-- 372 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
set -e

if [ "$1" = "purge" ] ; then
	if su cyphesis -s /bin/sh -c "psql -c \"\" template1" >/dev/null 2>&1; then
		su cyphesis -s /bin/sh -c "dropdb --if-exists --no-password cyphesis" >/dev/null 2>&1
		su postgres -s /bin/sh -c "dropuser --if-exists --no-password cyphesis" >/dev/null 2>&1
	fi
	rm -rf /var/log/cyphesis/
	rm -rf /run/cyphesis/
fi

#DEBHELPER#