summaryrefslogtreecommitdiff
path: root/pcr/tcpcrypt/tcpcrypt.install
diff options
context:
space:
mode:
authorGaming4JC <g4jc@openmailbox.org>2015-07-25 14:19:59 -0400
committerGaming4JC <g4jc@openmailbox.org>2015-07-25 14:19:59 -0400
commit099e1f9a926792eedd9a4f97ea54d550fdda39cd (patch)
tree2d3b06cde3b839885aa4f64836d0b50dbf3a98b2 /pcr/tcpcrypt/tcpcrypt.install
parent7dd5ee00d78ce6ebb2f316410a091c56fd12a005 (diff)
updating tcpcrypt PKGBUILD
Diffstat (limited to 'pcr/tcpcrypt/tcpcrypt.install')
-rw-r--r--pcr/tcpcrypt/tcpcrypt.install26
1 files changed, 26 insertions, 0 deletions
diff --git a/pcr/tcpcrypt/tcpcrypt.install b/pcr/tcpcrypt/tcpcrypt.install
new file mode 100644
index 000000000..0bf2ed9bd
--- /dev/null
+++ b/pcr/tcpcrypt/tcpcrypt.install
@@ -0,0 +1,26 @@
+post_install() {
+JAIL_DIR=/var/run/tcpcryptd
+JAIL_USER=tcpcryptd
+ if [ ! -d "$JAIL_DIR" ]
+ then
+ echo "Creating jail directory $JAIL_DIR"
+ (umask 077 && mkdir $JAIL_DIR)
+ fi
+
+ id $JAIL_USER >/dev/null 2>&1
+ if [ $? -ne 0 ]
+ then
+ echo "Creating user and group '$JAIL_USER'"
+ useradd -s /nonexistent -d /nonexistent -M -U $JAIL_USER
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ userdel tcpcryptd &>/dev/null
+ groupdel tcpcryptd &>/dev/null
+ rm -rf /var/run/tcpcryptd
+} \ No newline at end of file