diff options
| author | 2026-08-03 14:59:48 +0200 | |
|---|---|---|
| committer | 2026-08-03 14:59:48 +0200 | |
| commit | 0abaa1e852165a7322b727fc952503cf962970ff (patch) | |
| tree | bf712e84159be10b8b12102ce25c9ba75a85c779 | |
| parent | d4e4206683d3d990f2f8b7673e46c76ddba7d168 (diff) | |
Log to stdout using logfile and tail -f. So everything is together in
docker log visible
| -rw-r--r-- | docker-compose.yml | 1 | ||||
| -rwxr-xr-x | src/git-run | 2 | ||||
| -rwxr-xr-x | src/init | 5 |
3 files changed, 5 insertions, 3 deletions
diff --git a/docker-compose.yml b/docker-compose.yml index 67638bd..4eee4d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,4 +21,3 @@ services: volumes: - ./donotsync/ssh:/var/ssh - ./donotsync/repos:/srv/repos - - ./donotsync/log:/var/log diff --git a/src/git-run b/src/git-run index 7d70ef8..2b062e8 100755 --- a/src/git-run +++ b/src/git-run @@ -14,7 +14,7 @@ set currentUser (whoami) ### function log --on-event log - echo "$(date -Is): $argv[1..2] user=$currentUser $argv[3..] ip=$SSH_CONNECTION" >> $_LOG + echo "$argv[1..2] user=$currentUser $argv[3..] ip=$SSH_CONNECTION" >> $_LOG end function parseCommand @@ -183,9 +183,12 @@ for repoConfig in $repos end # create writable log file for run script -touch $_LOG && chmod 777 $_LOG +truncate -s 0 $_LOG && chmod 777 $_LOG setupSSH; or return $status +# grep log in background +tail -f $_LOG & + # run ssh daemon exec /usr/sbin/sshd -D -e |
