Zeus Panchenko wrote on 08/22/2016 15:06:
hi,

what is the best way to guarantee scripts starting order?

I need sshd start first and squid start last among all scripts which are 
starting

is the only way to put (for example) to /usr/local/etc/rc.d/ script/s
to order it?

so, to just start squid after sshd I need something like this:

---[ /usr/local/etc/rc.d/ORDER1 start ]---

#!/bin/sh
#

# PROVIDE: precedence
# REQUIRE: sshd
# BEFORE: squid

---[ /usr/local/etc/rc.d/ORDER1 stop  ]---


but how to configure it globally to start sshd just after network 
initialization?
is it something like this?

---[ /usr/local/etc/rc.d/ORDER0 start ]---

#!/bin/sh
#

# PROVIDE: precedence
# REQUIRE: NETWORKING pf pflog
# BEFORE: sshd

---[ /usr/local/etc/rc.d/ORDER0 stop  ]---

is there some other way to order them?

I had similar requirements so I had this

/usr/local/etc/rc.d/sshd_reorder

#!/bin/sh

# PROVIDE: sshd_reorder
# REQUIRE: LOGIN sshd

## this file is just to start sshd earlier on the boot
## mainly before long starting processes like jails, mysql, apache etc.
##
## place this file in to /usr/local/etc/rc.d/sshd_reorder
## and make it executable chmod 0555 /usr/local/etc/rc.d/sshd_reorder


I don't know when Squid starts (I don't use it) so you can look in to output of rcorder /etc/rc.d/* /usr/local/etc/rc.d/* and use NETWORKING alone or some more specific

Miroslav Lachman
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[email protected]"

Reply via email to