Fix startup script to create dummy config and dummy certificates.
This commit is contained in:
parent
5c45edb774
commit
09fda44f25
@ -15,6 +15,7 @@ RUN apk add --no-cache --virtual build-dependencies \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..; \
|
||||
make; \
|
||||
make install; \
|
||||
cd .. && cp -r pki /usr/share/doc/taskd/; \
|
||||
cd ../.. && rm -rf taskserver; \
|
||||
apk del --purge build-dependencies; \
|
||||
apk add --no-cache gnutls libuuid util-linux bash libgcc libstdc++; \
|
||||
|
18
taskd.sh
18
taskd.sh
@ -8,16 +8,20 @@ if [[ ! -w $TASKDDATA ]] ; then
|
||||
>&2 echo " Did you set permissions on the volume correctly?"
|
||||
fi
|
||||
|
||||
# Refresh example configuration
|
||||
if [[ -d $TASKDDATA/example ]] ; then
|
||||
rm -rf "$TASKDDATA/example"
|
||||
fi
|
||||
# Do preliminary configuration if needed.
|
||||
if [[ ! -f $TASKDDATA/config ]] ; then
|
||||
mkdir "$TASKDDATA"
|
||||
|
||||
mkdir -p "$TASKDDATA/example" || exit 1
|
||||
taskd init --data "$TASKDDATA/example"
|
||||
taskd init --data "$TASKDDATA"
|
||||
taskd config --force server=0.0.0.0:53589
|
||||
|
||||
# Generating stub certificates that WILL BE INVALID.
|
||||
# See taskd configuration guide for configuring it right.
|
||||
/usr/share/doc/taskd/pki/generate
|
||||
fi
|
||||
|
||||
# Print version and diagnostics to logs
|
||||
taskd diagnostics --data "$TASKDDATA"
|
||||
|
||||
# Hand off to taskd
|
||||
exec taskd server
|
||||
exec taskd server
|
||||
|
Loading…
x
Reference in New Issue
Block a user