Skip to content

Commit

Permalink
Update python-app-2.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
0wwafa authored Nov 27, 2024
1 parent 12cc82f commit e8ed41a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/python-app-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ jobs:
passwd -d root
touch ~root/.hushlogin
cat logo.txt >/etc/issue
cp profile ~root/.profile
cp profile ~runner.profile
chmod 755 ~root/.profile ~runner.profile
cat >>~root/.profile <<EOF1
eval \\$(cat /proc/\\$(pidof -x "sleep infinity")/environ | tr '\0' '\n' | awk -F= '{print "export \""\$1"\"=\""substr(\\$0, index(\\$0,\\$2))"\""}')
cd \\$HOME
EOF1
cat >>~runner/.profile <<EOF2
eval \\$(cat /proc/\\$(pidof -x "sleep infinity")/environ | tr '\0' '\n' | awk -F= '{print "export \""\$1"\"=\""substr(\\$0, index(\\$0,\\$2))"\""}')
cd \\$HOME
EOF2
ln -sf /usr/share/zoneinfo/Africa/Cairo /etc/localtime
lsof -Fn | grep -F '.log' | grep -v deleted | awk '/^n/ {print substr(\$0, 2)}' | xargs -I {} rm -rf {}
rm -rf /var/log/*
Expand Down

0 comments on commit e8ed41a

Please sign in to comment.