diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-03-09 01:56:28 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-03-09 01:56:28 +0000 |
commit | 2d18912059d86be84090b0ccb2764868b6b90a3c (patch) | |
tree | dc468585d7ecd4c469d514058ae6bdc55c0a0b60 /scripts | |
parent | Add git-mirror.cron (diff) | |
download | config-2d18912059d86be84090b0ccb2764868b6b90a3c.tar.bz2 config-2d18912059d86be84090b0ccb2764868b6b90a3c.tar.xz config-2d18912059d86be84090b0ccb2764868b6b90a3c.zip |
Drop to user and re-exec
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/git-mirror.cron | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/git-mirror.cron b/scripts/git-mirror.cron index 4dc385f..311180a 100755 --- a/scripts/git-mirror.cron +++ b/scripts/git-mirror.cron @@ -1,5 +1,7 @@ #!/bin/bash +[[ $(id -u) -eq 0 ]] && exec sudo -H -u randomdan $0 $@ + find /var/git -maxdepth 2 -name config -type f | \ xargs grep -F '[remote "github"]' -l | \ xargs dirname | \ |