Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sevizio carshed
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 513

PostPosted: Mon Apr 13, 2020 9:47 am    Post subject: sevizio carshed Reply with quote

Ho fatto un init script per avviare un programma

l'init script funziona dopo l'avvio con stop, start e restart

ma ggiunto al runvel di default crasha, e non riesco a trovarne il motivo, abilitando il log trovo solo

Code:
* Starting spotifyd ...
 [ ok ]


l'init script é questo

Code:
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

description="Spotifyd streams music just like the official client"

logfile="/var/log/spotifyd.log"
command="/usr/bin/spotifyd"
command_args="--no-daemon"
start_stop_daemon_args="--nicelevel -10 --stderr ${logfile}"

command_background=yes
pidfile=/run/spotifyd.pid

#need net
depend() {
    use alsasound
    after bootmisc
}

stop() {
    ebegin "Stopping Spotifyd"
    start-stop-daemon --stop --quiet \
    --exec /usr/bin/spotifyd
    eend $?
}


Code:
unlevel: default
 dhcpcd                                                                                                             [  started  ]
 netmount                                                                                                           [  started  ]
 alsasound                                                                                                          [  started  ]
 chronyd                                                                                                            [  started  ]
 mpd                                                                                                                [  started  ]
 networkaudiod                                                                                                      [  started  ]
 rpi4-eeprom-updater                                                                                                [  started  ]
 spotifyd                                                                                                           [  crashed  ]
 sshd                                                                                                               [  started  ]
 upmpdcli                                                                                                           [  started  ]
 web                         
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31449
Location: here

PostPosted: Mon Apr 13, 2020 11:06 am    Post subject: Reply with quote

In /etc/rc.conf prova ad abilitare
Code:
# Through rc_log_path you can specify a custom log file.
# The default value is: /var/log/rc.log
#rc_log_path="/var/log/rc.log"

e vedi se in questo log ci sia qualcosa di utile
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 513

PostPosted: Mon Apr 13, 2020 11:36 am    Post subject: Reply with quote

fedeliallalinea wrote:
In /etc/rc.conf prova ad abilitare
Code:
# Through rc_log_path you can specify a custom log file.
# The default value is: /var/log/rc.log
#rc_log_path="/var/log/rc.log"

e vedi se in questo log ci sia qualcosa di utile


mhhh, ho attivato anche verbose, ma niente di particolare

Code:
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/spotifyd start
 * Starting spotifyd ...
 * start-stop-daemon: fopen `/run/spotifyd.pid': No such file or directory
 * Detaching to start `/usr/bin/spotifyd' ...
 [ ok ]
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/sshd start
 * Starting sshd ...
 * start-stop-daemon: fopen `/run/sshd.pid': No such file or directory
 * Detaching to start `/usr/sbin/sshd' ...
 [ ok ]


é come se richiedesse il terminale...
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 513

PostPosted: Mon Apr 13, 2020 3:20 pm    Post subject: Reply with quote

non va in crash se la rete é impostata con ip statico....


non esiste una funzione tipo waitIP?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum