mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-22 21:47:19 +00:00
Added startup script to kill sinker and hl_client in self-hosted mode (#339)
These two processes do nothing in self-hosted mode and is now removed from the init startup script.
This commit is contained in:
parent
b35653f86f
commit
2388a135ef
30
SD_ROOT/wz_mini/etc/init.d/S21killmisc
Normal file
30
SD_ROOT/wz_mini/etc/init.d/S21killmisc
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Kills unwanted processes in selfhosted mode (sinker and hl_client)
|
||||||
|
# Description: sinker and hl_client phones home. In self-hosted mode, these two processes can be killed to save CPU cycles (and reduce log spam).
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
# If not enabled, quit
|
||||||
|
if [[ "$ENABLE_SELFHOSTED_MODE" != "true" ]] ; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove sinker/hl_client lines from the startup script
|
||||||
|
sed -i '/sinker/d' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
|
sed -i '/hl_client/d' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
Loading…
Reference in New Issue
Block a user