How to auto start services? And why some of them disappeared from the services list?

e-r-a-n

Neuer User
Mitglied seit
4 Okt 2012
Beiträge
45
Punkte für Reaktionen
0
Punkte
0
Hello everyone,
I have a fritzbox 7390 with 05.22 & 9445 version.
I have transmission, nfs and samba services (among some others)
I've been searching for a way to make samba & nfs always start at boot, and came across crontab.
I inserted there the following:
Code:
@reboot /etc/init.d/rc.samba
@reboot /etc/init.d/rc.nfsd

I saved, changed cron to automatic and then, after reboot, not only the services were still stopped, but now transmission and some other services doesnt appear in freetz menus.
if i connect with telnet and do /etc/init.d/rc.transmission, it starts and then it appears in the list of services, but its not there when its not started. its the same for the other processes (smb,nfs)

What have i done wrong? :\

edit: when I try to manually start samba from settings menu (freetz), it then shows:
Code:
smbd: can't load library 'libresolv.so.0'
Starting Samba-smbd ... failed.
 
Zuletzt bearbeitet:
Normally you can enable the services from the web interface, like you did with cron.
Maybe cron starts the services too early for them to run. When started by Freetz, they are started in the right order.
As to why libresolv is missing, did you select something for external?
 
Well, i didnt touch anything related to external.
maybe the file got corrupted? I will try to replace it with the copy of it when i get back home from work.
As for cron, thats too bad, because it could really be an easy solution.
what other options do i have to start services on boot, automatically?
 
In settings -> Freetz, I have set:
Directory for external: /var/media/ftp/uStor11/external
where in this folder i have two external files, because im not sure which one is the one i always had, but both are there:
Code:
root@fritz:/var/media/ftp/uStor11# ls -R
.:
7390_05.22-freetz-devel-9445.en_20121005-143346.external
7390_05.22-freetz-devel-9445.en_20121006-161710.external
external

./external:
7390_05.22-freetz-devel-9445.en_20121005-143346.external
7390_05.22-freetz-devel-9445.en_20121006-161710.external
yet its still not finding the .so files, and its still not loading it right..
 
Every service has an automatic/manual field in its settings. Try that...
 
thank you, it helped (partially), the log is as follows:
Code:
Starting external (/var/media/ftp/external):
cifsmount is disabled.
openvpn is disabled.
Samba-nmbd is disabled.
Starting Samba-smbd ... done.
tinyproxy is disabled.
Starting transmission daemon ... done.
vsftpd is disabled.
Stopping transmission ... not running.
Starting Samba-smbd ... already running.
Starting nfsd ... done.
Starting openvpn ... done.
Starting external finished.
where the script is this:

Code:
/etc/init.d/rc.transmission stop
/etc/init.d/rc.smbd start
/etc/init.d/rc.nfsd start
/etc/init.d/rc.openvpn start

I dont know why, but it wont stop transmission even if i asked. it says its not running, but when i look at services tab, its running.
the other question I have is what determines if a service is auto started or auto stopped after boot?
I couldnt understand that from the syntax of the menus.
 
If you choose automatic the daemon is started at boot time. If you choose manual mode it isn't. Sounds simple?

You have to make sure that you always use the rc infrastructure. Do not start transmission by executing the transmission binary by hand.
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.