automated terminal push
This commit is contained in:
51
tor-robot-remix/install/install.full.bash
Executable file
51
tor-robot-remix/install/install.full.bash
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
|
||||
##
|
||||
## This script installs the digital hunter killer drone.
|
||||
## The scripts will be installed to /var/root/robot-process-killer/
|
||||
## The scripts will be automated via cron job configuration
|
||||
##
|
||||
## Questions or issues? Email me here:
|
||||
##
|
||||
## the.software.shinobi@gmail.com
|
||||
##
|
||||
|
||||
set -x
|
||||
|
||||
set -e
|
||||
|
||||
##
|
||||
|
||||
mkdir -p /var/root/robot-process-killer/
|
||||
|
||||
ls -lha /var/root/robot-process-killer/
|
||||
|
||||
##
|
||||
|
||||
cp -r robot/* /var/root/robot-process-killer/
|
||||
|
||||
ls -lha /var/root/robot-process-killer/
|
||||
|
||||
##
|
||||
|
||||
cd /var/root/robot-process-killer/
|
||||
|
||||
chmod +x *.bash
|
||||
|
||||
ls -lha
|
||||
|
||||
##
|
||||
|
||||
echo "* * * * * /var/root/robot-process-killer/robot-kill-target-system-processes.sh" >> robotcron
|
||||
|
||||
echo "printing crontab"
|
||||
|
||||
cat robotcron
|
||||
|
||||
crontab -u root robotcron
|
||||
|
||||
##
|
||||
|
||||
echo
|
||||
echo "finished installing robot and configuring cron".
|
||||
echo
|
||||
51
tor-robot-remix/install/install.partial.bash
Executable file
51
tor-robot-remix/install/install.partial.bash
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
|
||||
##
|
||||
## This script installs the digital hunter killer drone.
|
||||
## The scripts will be installed to /var/root/robot-process-killer/
|
||||
## The scripts will be automated via cron job configuration
|
||||
##
|
||||
## Questions or issues? Email me here:
|
||||
##
|
||||
## the.software.shinobi@gmail.com
|
||||
##
|
||||
|
||||
set -x
|
||||
|
||||
set -e
|
||||
|
||||
##
|
||||
|
||||
mkdir -p /var/root/robot-process-killer/
|
||||
|
||||
ls -lha /var/root/robot-process-killer/
|
||||
|
||||
##
|
||||
|
||||
cp -r robot/* /var/root/robot-process-killer/
|
||||
|
||||
ls -lha /var/root/robot-process-killer/
|
||||
|
||||
##
|
||||
|
||||
cd /var/root/robot-process-killer/
|
||||
|
||||
chmod +x *.bash
|
||||
|
||||
ls -lha
|
||||
|
||||
##
|
||||
|
||||
echo "* 19 * * * /var/root/robot-process-killer/robot-kill-target-system-processes.sh" >> robotcron
|
||||
|
||||
echo "printing crontab"
|
||||
|
||||
cat robotcron
|
||||
|
||||
crontab -u root robotcron
|
||||
|
||||
##
|
||||
|
||||
echo
|
||||
echo "finished installing robot and configuring cron".
|
||||
echo
|
||||
11
tor-robot-remix/install/provision.bash
Executable file
11
tor-robot-remix/install/provision.bash
Executable file
@@ -0,0 +1,11 @@
|
||||
|
||||
echo "00 09 * * 1-5 echo hello" >> mycron
|
||||
|
||||
echo "printing crontab"
|
||||
|
||||
cat mycron
|
||||
|
||||
crontab mycron
|
||||
|
||||
crontab -l
|
||||
|
||||
30
tor-robot-remix/install/uninstall.bash
Executable file
30
tor-robot-remix/install/uninstall.bash
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
##
|
||||
## This script uninstalls the digital hunter killer drone.
|
||||
## The scripts uninstalls by removing all target cron job entries
|
||||
## The script DOES NOT delete any of the script files
|
||||
##
|
||||
## Questions or issues? Email me here:
|
||||
##
|
||||
## the.software.shinobi@gmail.com
|
||||
##
|
||||
|
||||
set -e;
|
||||
set -x;
|
||||
|
||||
##
|
||||
|
||||
## reset;
|
||||
|
||||
## clear;
|
||||
|
||||
##
|
||||
|
||||
## Remove the target crontab entry
|
||||
|
||||
crontab -u root -l | grep -v '* * * * * /root/robot-process-killer/robot-kill-target-system-processes.sh >/dev/null 2>&1' | crontab -u root -
|
||||
|
||||
## Show the current crontab entry
|
||||
|
||||
crontab -l
|
||||
Reference in New Issue
Block a user