On RedHat/CentOS systems, all of the service management scripts in /etc/init.d (and also run by the "service" command) produce color output. (i.e. the "[ OK ]" and "[FAILED]" strings.) How do I disable this? (The color-producing escape sequences are making the webistrano output more ugly than it needs to be.)
Redhat – Disable colour output from /etc/init.d scripts
capistranocolorinit.dredhatservice
Related Topic
- Linux – How to find error messages from Linux init.d/rc.d scripts
- Linux – How to remove/backup script from /etc/init.d/
- Red Hat and CentOS – Why Upgrading Between Major Versions is Difficult
- Redhat – Running arbitrary program as daemon from init script
- Centos – Need help converting init.d service scripts to systemd (CentOS)
- Systemd failing enable with “service is transient or generated”. What’s wrong with this configuration
Best Answer
Check out
/etc/sysconfig/init
. The top lines on my CentOS 5.x system:Changing the BOOTUP line to something like
nocolor
eliminates the formatting for all init scripts.If you just want to disable formatting on one of your scripts, add:
after the line that reads: