forked from nrdufour/taskwarrior-web
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-entrypoint.sh
More file actions
executable file
·36 lines (30 loc) · 1.05 KB
/
docker-entrypoint.sh
File metadata and controls
executable file
·36 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
if ! test -e /root/.taskrc; then
echo 'Container NEW.'
ln -s /root/.task/taskrc /root/.taskrc
if ! test -e /root/.task/taskrc; then
echo 'Container config create.'
echo "confirmation=off" > /root/.task/taskrc
fi
task config data.location -- /root/.task
if [ "$TASKD_SERVER" ]; then
echo "Sync enable."
if [[ -f ${CLIENT_CERT_PATH}/client.credentials ]]; then
TASKD_CREDENTIALS=`cat ${CLIENT_CERT_PATH}/client.credentials`
fi
task config taskd.server -- ${TASKD_SERVER}
task config taskd.credentials -- ${TASKD_CREDENTIALS}
task config taskd.certificate -- ${CLIENT_CERT_PATH}/client.cert.pem
task config taskd.key -- ${CLIENT_CERT_PATH}/client.key.pem
task config taskd.ca -- ${CLIENT_CERT_PATH}/ca.cert.pem
# task config taskd.trust -- strict
task add "Doker ${TASKD_SERVER} init with sync. Delete me."
else
task add "Doker hav0k/taskwarrior-web init without sync. Delete me."
fi
fi
if [ $# -gt 0 ];then
exec "$@"
else
exec task-web -F -L
fi