The officially official Devuan Forum!

You are not logged in.

#1 2023-03-01 23:29:17

Registered: 2023-03-01
Posts: 1  

Service for ipp-usb printing


I made this thread about devuan at the superuser website: … 56#1771256

I am a bit of a beginner, and trying to implement the service for ipp-usb printing that runs at startup on debian.

As you can see, the people on the website gave me a template for a service script:

#! /bin/bash

# Provides:          foo
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: foo service
# Description:       Run Foo service

# Carry out specific functions when asked to by the system
case "$1" in
    echo "Starting Foo..."
    sudo -u foo-user bash -c 'cd /path/to/scripts/ && ./'
    echo "Stopping Foo..."
    sudo -u foo-user bash -c 'cd /path/to/scripts/ && ./'
    sleep 2
    echo "Usage: /etc/init.d/foo {start|stop}"
    exit 1

exit 0

I realized this was much more difficult than I thought. I was hoping I could simply paste "ipp-usb" in there somewhere and that was it. Therefore, my questions are the following:

1. How can I find out the values that are correct for the block at the top that is commented out? Will the OS provide the values for Required-Start and Required-Stop? What about Default-Start, Default-Stop ?
2. When it comes to the lines for starting and stopping foo; (i) would I write "sudo ipp-usb" in the line that starts the service? And (ii) is it "sudo killall ipp-usb" for the other one?
3. Can i break my OS and unable to boot if I write the script incorrectly?
4. Is there anything else I will need to succeed?

Thanks for your time!

Last edited by king.oslo (2023-03-01 23:32:12)


Board footer