Hot answers tagged

2

Don't use an init.d service. Write an Upstart job instead. Here's an example. Upstart will take care of keeping the program in the background, logging, etc. Your service would be in /etc/init/mcp.conf, containing, for example: start on runlevel [2345] stop on runlevel [016] exec /usr/bin/mcp -d f -c /etc/mcp Then you can do: sudo service mcp start ...


2

assuming you are using ubuntu 16.04 you can use systemctl to control services. to get a list of services and their status systemctl | grep service to control an individual service , replace service with the service name systemctl status service systemctl stop service systemctl start service in older version of ubuntu services can be controlled via ...


1

You can solve this by adding your call into /etc/rc.local so that files contents would look like this afterwards: #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the ...


1

What is happening here is that since Ubuntu 15.04 Ubuntu distros use systemd init-service instead of SysVinit or Upstart. So a service must be disabled with this command: sudo systemctl disable SERVICENAME.service If one is confused with all this stuff: init-service, systemd, SysVinit, Upstart I can recommend to read Chapter 15 "Starting and Stopping ...


1

First you check your status using this command sudo service apache2 status then stop the running service sudo service apache2 stop then use this command: sudo /opt/lampp/lampp start this solution has worked for me.



Only top voted, non community-wiki answers of a minimum length are eligible