HELLO_wORLD
Very Senior Member
Little trick to make the script neater:
There is already a killall command in /usr/bin
Create a fonction to kill by name, here nkill, and a fonction to check, make non executable and kill, here neutralize, and then just call the fonction for each binaries with f
Note that anything that needs to be stopped or disabled from init.d scripts are to not use those, like:
There is already a killall command in /usr/bin
Code:
neutralize() { [ -x "$1" ] && { chmod -x $1; killall -q ${1##*/}; } }
neutralize '/usr/sbin/ra_check'
neutralize '/sbin/qos.sh'
# PRINT SERVICES
neutralize '/sbin/KC_BONJOUR'
neutralize '/sbin/KC_PRINT'
# DNI POT
neutralize '/usr/sbin/netconn.sh'
neutralize '/usr/sbin/potd'
neutralize '/usr/sbin/potval'
etc...
Note that anything that needs to be stopped or disabled from init.d scripts are to not use those, like:
Code:
# init.d
[ -x /usr/sbin/aws-iot ] && { /etc/init.d/aws disable; chmod -x /usr/sbin/aws-iot; }
[ -x /sbin/traffic_meter ] && { /etc/init.d/traffic_meter stop; chmod -x /sbin/traffic_meter; }
etc...
Last edited: