Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ pipeline {
steps{
sh '''#!/bin/bash
cat ${GIT_SIGNING_KEY} > /config/.ssh/id_sign
chmod 600 /config/.ssh/id_sign
if [ "${KEEP_PERMISSIONS:-false}" != "true" ]; then
chmod 600 /config/.ssh/id_sign
fi
ssh-keygen -y -f /config/.ssh/id_sign > /config/.ssh/id_sign.pub
echo "Using $(ssh-keygen -lf /config/.ssh/id_sign) to sign commits"
git config --global gpg.format ssh
Expand Down
12 changes: 7 additions & 5 deletions root/etc/s6-overlay/s6-rc.d/init-ddclient-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
/run/ddclient-cache
fi

chmod 700 \
/config \
/run/ddclient-cache
if [ "${KEEP_PERMISSIONS:-false}" != "true" ]; then
chmod 700 \
/config \
/run/ddclient-cache

chmod 600 \
/config/*
chmod 600 \
/config/*
fi
6 changes: 5 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-inotify/run
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

_keep_permissions="${KEEP_PERMISSIONS:-false}"

# starting inotify to watch /config/ddclient.conf and restart ddclient if changed.
while inotifywait -e modify /config/ddclient.conf; do
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
lsiown abc:abc /config/ddclient.conf
fi
chmod 600 /config/ddclient.conf
if [ "${_keep_permissions}" != "true" ]; then
chmod 600 /config/ddclient.conf
fi
s6-svc -h /run/service/svc-ddclient
echo "ddclient has been restarted"
done