summaryrefslogtreecommitdiff
path: root/reprepro/init.sh
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2016-04-19 14:03:05 +0200
committerJonas Smedegaard <dr@jones.dk>2016-04-19 14:03:05 +0200
commit9cc51aa915e331a90be82d7d76ef1f73c74bc7de (patch)
treeba2241a1c848ab1fe90f24e72cb10e6061064a29 /reprepro/init.sh
parent3b23e8e9183203164c1db455fe1933bfcea139b5 (diff)
First draft of reprepro snippets.
Diffstat (limited to 'reprepro/init.sh')
-rwxr-xr-xreprepro/init.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/reprepro/init.sh b/reprepro/init.sh
new file mode 100755
index 0000000..a326531
--- /dev/null
+++ b/reprepro/init.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+THISDIR=$(dirname "$0")
+HOMEDIR=~www-deb
+INDIR=/srv/deb/UploadQueue
+
+[ -d $HOMEDIR ] || {
+ echo "ERROR: user www-deb missing" >/dev/stderr
+ exit 1
+}
+
+BASEDIR="$HOMEDIR/private_webdata/reprepro"
+[ -d "$BASEDIR/conf" ] || cp "$THISDIR/conf" "$BASEDIR"
+
+mkdir -p "$INDIR"
+chown www-deb: "$INDIR"
+chmod g+s "$INDIR"