aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docker/entrypoint.sh
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-12-03 03:39:44 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2022-12-03 03:39:44 +0100
commit3c4941bb88ac6bcfd93e297a922be4b80b8991ea (patch)
treea569764896bfecd6c72d9c757bb5867cac690e7b /docker/entrypoint.sh
parentdocker: refactor entrypoint.sh (diff)
downloadcgitize-3c4941bb88ac6bcfd93e297a922be4b80b8991ea.tar.gz
cgitize-3c4941bb88ac6bcfd93e297a922be4b80b8991ea.zip
docker: chmod o-rwx the output directory
Diffstat (limited to 'docker/entrypoint.sh')
-rwxr-xr-xdocker/entrypoint.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 5674e36..61ecd1e 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -8,6 +8,13 @@
set -o errexit -o nounset -o pipefail
readonly base_dir=/usr/src
+readonly cfg_path=/etc/cgitize/cgitize.toml
+
+secure_repo_dir() {
+ local dir
+ dir="$( /get_output_dir.py -- "$cfg_path" )"
+ chmod -- o-rwx "$dir"
+}
schedule_to_cron() {
local schedule
@@ -55,6 +62,7 @@ setup_cron_task() {
}
main() {
+ secure_repo_dir
setup_cron_task "$@"
}