Have a service start on startup with Ubuntu

Posted by Joseph Silvashy on Server Fault See other posts from Server Fault or by Joseph Silvashy
Published on 2010-03-21T21:45:35Z Indexed on 2010/03/21 21:51 UTC
Read the original article Hit count: 502

Filed under:
|
|

I'm not clear on how to start a service when the server boots, I read on some of the other questions asked about adding the script to /etc/init.d, but It's just one line that I need to execute in the commandline:

sudo /etc/init.d/avahi-daemon restart

But I have a few issues with this, firstly, I apparently need to use sudo, and it gives me the following:

ngl-server-01:~% sudo /etc/init.d/avahi-daemon start  
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service avahi-daemon start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start avahi-daemon

But when I try just avahi-daemon start I get:

Too many arguments

Why is this? and how would you start this service?

© Server Fault or respective owner

Related posts about ubuntu

Related posts about avahi

  • Delete eth0 avahi from the ifconfig list

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    Hello this is the response I get from ifconfig. Now I have two eth0 things being showed up. I need to delete the second one which says eth0:avahi. I posted my ifconfig's response on a site as I has problem using wired internet, and they suggested to remove the eth0 avahi, to get internet. But I am… >>> More

  • About the use of dotted hostname with avahi

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    Hi I recently discovered avahi. It help you when you when to resolve hostname for the local network. But in my situation i've got a issue. I decided to host a machine called "a.alpha" and a another called "b.aplha". In a near futur i will also use some machine called "a.beta" and "b.beta". My probleme… >>> More

  • Avahi DNS Stack for iPhone?

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Hello, I would like to know if we have an avahi api for iphone side? Alternatively, can we implement avahi protocol in iphone? The avahi API provides: avahi-core: an API for embedding a complete mDNS/DNS-SD stack into your software. This is intended for developers of embedded appliances … >>> More

  • forked-daapd without avahi

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I'm trying to setup forked-daapd, but i'd prefer it if i could run it without avahi (or rather define my own avahi service instead of using the dbus api). The reason is that i want a netatalk share for my time machine backups and a samba share for the symbolic link support (netatalk doesn't support… >>> More

  • SSH to an ubuntu machine using avahi

    as seen on Server Fault - Search for 'Server Fault'
    I have an ubuntu box that I connect to using avahi. Connecting to that box works fine for all services (I regularly use AFP, SSH and SMB on it) but I've noticed that whenever I connect to it from a mac using SSH (and using the ".local" dns name provided by avahi - eg. "ssh .local") SSH tries to connect… >>> More