Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 26 lines (20 sloc) 773 Bytes
#!/bin/sh
rootdir=/home/ec2-user
exec=$rootdir/openresty-tester.pl
user=ec2-user
logfile=$rootdir/openresty-tester.log
args="$@"
run='su --session-command='
name=ortest_`date +'%Y%m%d-%H%M%S'`_`hostname`
logfile2=/tmp/$name.log
mlog=$rootdir/ortest.log
#$run"whoami > $logfile 2>&1" $user
$run"(echo -n 'DATE '; TZ=GMT date +'%Y-%m-%d %H:%M:%S') > $logfile 2>&1" $user
$run"(echo -n 'ARCH '; uname -a) >> $logfile 2>&1" $user
$run"PATH=$PATH $exec make -k --git-pull $args >> $logfile 2>&1" $user
$run"cp $logfile $logfile2 > $mlog" $user
$run"cd /tmp && tar -czf $name.tar.gz $name.log > $mlog 2>&1" $user
$run"PATH=$PATH $rootdir/ortest-upload /tmp/$name.tar.gz > $mlog 2>&1" $user
$run"cd /tmp && rm -f $name.log $name.tar.gz" $user
shutdown -P +3
#shutdown -P now
You can’t perform that action at this time.