diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 15:48:04 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 15:48:04 +0200 |
commit | 89b7b67a13ebb7965cc7f13ad0595e2194a2d34c (patch) | |
tree | 25efd77a90ae87236e6730d8ea3846bbe0fd126f /package/control |
add sqmail-4.2.29asqmail-4.2
Diffstat (limited to 'package/control')
-rwxr-xr-x | package/control | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/package/control b/package/control new file mode 100755 index 0000000..8f2bdf8 --- /dev/null +++ b/package/control @@ -0,0 +1,36 @@ +#!/bin/sh + +shout() { echo "$0: $@" >&2; } +barf() { shout "fatal: $@"; exit 111; } +safe() { "$@" || barf "cannot $@"; } + +here=`env - PATH=$PATH pwd` +mypwd=${here%package} +mypwd=${mypwd%/} +home=`head -1 $mypwd/conf-home` + +safe umask 022 +[ -d package ] || barf "no package directory" +[ -d command ] || barf "no command directory" +[ -d ctl ] || barf "no ctl directory" +[ -d $home/control ] || barf "no s/qmail/control directory" + +[ -x command/hostname ] || barf "no 'hostname' file" + +[ -f $home/control/me ] || \ +safe command/hostname > $home/control/me + +[ -f $home/control/rcpthosts ] || \ +safe command/hostname > $home/control/rcpthosts + +[ -f $home/control/tlsdestinations ] || \ +safe echo '*:' > $home/control/tlsdestinations + +for i in `ls ctl` +do + [ -f $home/control/$i ] || safe cp ctl/$i $home/control/ +done + +shout "s/qmail control files populated." + +exit 0 |