diff --git a/process/launch.sh b/process/launch.sh index fef7b54..efac6fd 100755 --- a/process/launch.sh +++ b/process/launch.sh @@ -12,13 +12,17 @@ else fi PERL='/usr/bin/env perl' +reset_agents() +{ + echo "killall ssh-agent" | $SU intradmin +} + launch_screen() { CMD=$2 if [ -n "$3" ] && [ -f "$3" ] then TMP=`echo mktemp | $SU intradmin` - echo "killall ssh-agent" | $SU intradmin echo "ssh-agent" | $SU intradmin > "$TMP" echo ". $TMP; ssh-add '$3'" | $SU intradmin CMD=". $TMP; ssh-add -l; echo; $CMD" @@ -80,10 +84,12 @@ then case $HOSTNAME in cpp) + reset_agents launch_screen "lerdorf_process_ldap_sync_ssh_keys_forge" "while true; do $PERL ~/liblerdorf/process/ldap/sync_ssh_keys_forge.pl; done" ~intradmin/.ssh/git ;; hamano) + reset_agents launch_screen "lerdorf_process_ldap_sync_ssh_keys_git" "while true; do $PERL ~/liblerdorf/process/ldap/sync_ssh_keys_git.pl; done" ~intradmin/.ssh/git launch_screen "lerdorf_process_send_git" "while true; do $PERL ~/liblerdorf/process/files/send_git.pl; done" ~intradmin/.ssh/git ;;