Thursday, May 19, 2016

Enable or disable a service from autostarting on ubuntu and derivatives

To make a upsmon service to autostart during bootup:

sudo update-rc.d upsmon enable

The output looks like this:

update-rc.d: warning: /etc/init.d/upsmon missing LSB information
update-rc.d: see
 Disabling system startup links for /etc/init.d/upsmon ...
 Removing any system startup links for /etc/init.d/upsmon ...
   /etc/rc0.d/K06upsmon
   /etc/rc1.d/K06upsmon
   /etc/rc2.d/S61upsmon
   /etc/rc3.d/S61upsmon
   /etc/rc5.d/S61upsmon
   /etc/rc6.d/K06upsmon
 Adding system startup for /etc/init.d/upsmon ...
   /etc/rc0.d/K06upsmon -> ../init.d/upsmon
   /etc/rc1.d/K06upsmon -> ../init.d/upsmon
   /etc/rc6.d/K06upsmon -> ../init.d/upsmon
   /etc/rc2.d/K39upsmon -> ../init.d/upsmon
   /etc/rc3.d/K39upsmon -> ../init.d/upsmon
   /etc/rc5.d/K39upsmon -> ../init.d/upsmon


To disable autostart:

sudo update-rc.d upsmon disable


The output:

update-rc.d: warning: /etc/init.d/upsmon missing LSB information
update-rc.d: see
 Enabling system startup links for /etc/init.d/upsmon ...
 Removing any system startup links for /etc/init.d/upsmon ...
   /etc/rc0.d/K06upsmon                                                                          
   /etc/rc1.d/K06upsmon                                                                          
   /etc/rc2.d/K39upsmon                                                                          
   /etc/rc3.d/K39upsmon                                                                          
   /etc/rc5.d/K39upsmon                                                                          
   /etc/rc6.d/K06upsmon
 Adding system startup for /etc/init.d/upsmon ...
   /etc/rc0.d/K06upsmon -> ../init.d/upsmon
   /etc/rc1.d/K06upsmon -> ../init.d/upsmon
   /etc/rc6.d/K06upsmon -> ../init.d/upsmon
   /etc/rc2.d/S61upsmon -> ../init.d/upsmon
   /etc/rc3.d/S61upsmon -> ../init.d/upsmon
   /etc/rc5.d/S61upsmon -> ../init.d/upsmon

















To see available services:




service --status-all

No comments:

Renew letsencrypt ssl certificate for zimbra 8.8.15

 Letsencrypt certs usually consists of these files: 1. cert.pem 2. chain.pem 3. fullchain.pem 4. privkey.pem I am not going to discuss about...