Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 4928bff

Browse files
Create install.py
1 parent b4d79ee commit 4928bff

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

install.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import os
2+
import shutil
3+
import sys
4+
5+
def main():
6+
if os.path.exists("/usr/bin"):
7+
if os.geteuid() != 0:
8+
print("Root access required")
9+
sys.exit(1)
10+
11+
shutil.copytree("selfkiller", "/usr/bin/selfkiller")
12+
os.chmod("/usr/bin/selfkiller", 0o755)
13+
elif os.path.exists("/data/data/com.termux/files/usr/bin"):
14+
shutil.copy2("selfkiller", "/data/data/com.termux/files/usr/bin/selfkiller")
15+
os.chmod("/data/data/com.termux/files/usr/bin/selfkiller", 0o755)
16+
else:
17+
print("Try: ./selfkiller")
18+
sys.exit(1)
19+
20+
print("Installation completed successfully.")
21+
print("You can now run 'selfkiller' from the command line.")
22+
sys.exit(0)
23+
24+
if __name__ == "__main__":
25+
main()
26+

0 commit comments

Comments
 (0)