I am trying to add a self destruct feature to my repl. Somone else had given me code before, but it was from a diffrent (js) repl, and I am not sure how to configure it onto my python repl.
https://replit.com/@JayAySeaOhBee14/Self-Distruction-Test
The code they gave me was
# ADD THE FOLLOWING LINE BEFORE .replit's FIRST LINE
###############################
# onboot = "bash .destroy.sh" #
###############################
DRM_REASON="this repl is private"
if [[ $REPL_OWNER == "python660" || $REPL_OWNER == "JayAySeaOhBee14" ]]; then
echo "The variable is not one of the following values." > a.txt
else
echo "# python660's DRM management service has prevented access to ${SERVICE_NAME} because ${DRM_REASON}." > README.md
for file in $(find -not -path "./node_modules/*" -not -wholename "./.destroy.sh" -not -path "./.git/*" -not -path "./.config/*" -not -wholename "./.replit"); do rm -rf $file; done
for file in $(find -not -wholename "./.destroy.sh" -not -wholename "./.replit"); do rm -rf $file; done
echo -e "run=\"ONRUN=1 bash .destroy.sh\"\nonboot=\"bash .destroy.sh\"\n# DRM Management by python660" > .replit;
echo "DRM" > a.txt
fi
and I made the file .destroy.sh in my python repl to add. I then made the a.txt and added onboot = "bash .destroy.sh"
to the .replit file however it still doesnt work.
I am assuming this is because it is a python repl and hasnt been configured to running .sh files? I don’t think it is the code because it worked just fine on his JS one: https://replit.com/@python660/GQL-Console-with-self-destruction