diff options
author | defanor <defanor@uberspace.net> | 2017-04-29 04:36:01 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-04-29 04:36:01 +0300 |
commit | a06cc218bfa18943a46e051d5bbf463e1ddc0b6e (patch) | |
tree | d160d59dc14e0693ac8a304574dbf726b92850a0 /examples/p2p-im/tlsd-im-cmd.sh |
Initial commit
Diffstat (limited to 'examples/p2p-im/tlsd-im-cmd.sh')
-rw-r--r-- | examples/p2p-im/tlsd-im-cmd.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/p2p-im/tlsd-im-cmd.sh b/examples/p2p-im/tlsd-im-cmd.sh new file mode 100644 index 0000000..2888a66 --- /dev/null +++ b/examples/p2p-im/tlsd-im-cmd.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +create_fifo () { + if [ ! -e "${CHATDIR}${SHA256}/$1" ] + then mkfifo -m 660 "${CHATDIR}${SHA256}/$1" + fi +} + +CHATDIR="/var/lib/tlsd-im/" +mkdir -m 770 -p "${CHATDIR}${SHA256}/" +create_fifo "in" +create_fifo "out" +flock -n "${CHATDIR}${SHA256}/lock" std2fifo -c "${CHATDIR}" |