The officially official Devuan Forum!

You are not logged in.

#1 2021-08-08 19:19:17

DevuanUser345
Member
Registered: 2021-06-09
Posts: 14  

Missing init scripts

Hello guys,

I read a few days ago that more and more Debian packages are being built without Sysvinit scripts (if I remember correctly, there are currently more than 1100 packages). For the reason that Devuan is taking the packages from Debian, I wonder what the Devuan strategy is for this problem.

regards

Offline

#2 2021-08-08 21:07:22

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Missing init scripts

DevuanUser345 wrote:

I wonder what the Devuan strategy is for this problem

https://dev1galaxy.org/viewforum.php?id=25

Feel free to contribute smile


Brianna Ghey — Rest In Power

Offline

#3 2021-08-22 01:30:03

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,487  

Re: Missing init scripts

This package is in debian and devuan:
orphan-sysvinit-scripts

apt-file list orphan-sysvinit-scripts
orphan-sysvinit-scripts: /usr/lib/orphan-sysvinit-scripts/mapping
orphan-sysvinit-scripts: /usr/lib/orphan-sysvinit-scripts/update_init_d.sh
orphan-sysvinit-scripts: /usr/share/doc/orphan-sysvinit-scripts/README.Debian
orphan-sysvinit-scripts: /usr/share/doc/orphan-sysvinit-scripts/changelog.gz
orphan-sysvinit-scripts: /usr/share/doc/orphan-sysvinit-scripts/copyright
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/dirsrv
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/dirsrv.md5sum
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/dnscrypt-proxy
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/dnscrypt-proxy.md5sum
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/gpsd
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/gpsd.md5sum
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/iwd
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/iwd.md5sum
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/network-manager
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/network-manager.md5sum
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/nftables
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/nftables.md5sum
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/tomcat9
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/tomcat9.md5sum

Offline

#4 2021-08-22 15:45:04

thierrybo
Member
Registered: 2017-11-11
Posts: 107  

Re: Missing init scripts

fsmithred wrote:

This package is in debian and devuan:
orphan-sysvinit-scripts

apt-file list orphan-sysvinit-scripts
orphan-sysvinit-scripts: /usr/share/orphan-sysvinit-scripts/dnscrypt-proxy

Fo my dnscrypt-proxy I use this tweaked dsnscrypt-proxy (all parameters are in the .conf) file.:

#! /bin/sh
### BEGIN INIT INFO
# Provides:          dnscrypt-proxy
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: dnscrypt-proxy
# Description:       dnscrypt-proxy secure DNS client
### END INIT INFO

PATH=/usr/sbin:/usr/bin:/sbin:/bin
#####DAEMON=/usr/local/sbin/dnscrypt-proxy
DAEMON=/usr/sbin/dnscrypt-proxy
NAME=dnscrypt-proxy
########RESOLVER=dnscrypt.eu-nl

case "$1" in
    start)
        echo "Starting $NAME"
        #####$DAEMON --daemonize --ephemeral-keys --user=dnscrypt \
                #####--local-address=127.0.0.1 --resolver-name=$RESOLVER
        # $DAEMON --daemonize --ephemeral-keys --user=dnscrypt \
        #       --local-address=127.0.0.2 --resolver-name=$RESOLVER2
    $DAEMON /home/thierrybo/.config/dnscrypt-proxy/dnscrypt-proxy.conf
        ;;
    stop)
        echo "Stopping $NAME"
        pkill -f $DAEMON
        ;;
    restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: /etc/init.d/dnscrypt-proxy {start|stop|restart}"
        exit 1
        ;;
esac

exit 0

Offline

#5 2021-08-30 22:36:04

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 221  

Re: Missing init scripts

I'm a bit puzzled here, at least in respect of dnscrypt-proxy.

Certainly the deb for Beowulf Stable ( dnscrypt-proxy 2.0.19+ds1-2+devuan4) has a working init script (/etc/init.d/dnscrypt-proxy). I know, I use it.

Of course this init version may have been provided by the Devuan developers, not by Debian.

#!/bin/sh
### BEGIN INIT INFO
# Provides:          dnscrypt-proxy
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: DNSCrypt client proxy
# Description:       Encrypted/authenticated DNS proxy
### END INIT INFO

cmd="/usr/sbin/dnscrypt-proxy -config /etc/dnscrypt-proxy/dnscrypt-proxy.toml"

name=$(basename $(readlink -f $0))
pid_file="/var/run/$name.pid"
stdout_log="/var/log/$name.log"
stderr_log="/var/log/$name.err"

get_pid() {
    cat "$pid_file"
}

is_running() {
    [ -f "$pid_file" ] && ps $(get_pid) > /dev/null 2>&1
}

case "$1" in
    start)
        if is_running; then
            echo "Already started"
        else
            echo "Starting $name"
	    if  [ ! -d /var/cache/dnscrypt-proxy/ ]; then
		mkdir /var/cache/dnscrypt-proxy
	    fi
            cd '/root'
            $cmd >> "$stdout_log" 2>> "$stderr_log" &
            echo $! > "$pid_file"
            if ! is_running; then
                echo "Unable to start, see $stdout_log and $stderr_log"
                exit 1
            fi
        fi
    ;;
    stop)
        if is_running; then
            echo -n "Stopping $name.."
            kill $(get_pid)
            for i in $(seq 1 10)
            do
                if ! is_running; then
                    break
                fi
                echo -n "."
                sleep 1
            done
            echo
            if is_running; then
                echo "Not stopped; may still be shutting down or shutdown may have failed"
                exit 1
            else
                echo "Stopped"
                if [ -f "$pid_file" ]; then
                    rm "$pid_file"
                fi
            fi
        else
            echo "Not running"
        fi
    ;;
    force-reload|restart)
        $0 stop
        if is_running; then
            echo "Unable to stop, will not attempt to start"
            exit 1
        fi
        $0 start
    ;;
    status)
        if is_running; then
            echo "Running"
        else
            echo "Stopped"
            exit 1
        fi
    ;;
    *)
    echo "Usage: $0 {start|stop|restart|status}"
    exit 1
    ;;
esac
exit 0

Offline

Board footer