Closed tlhackque closed 8 years ago
This is a local system management issue. You haven't specified your OS/distribution, which makes it hard to help.
The chkconfig
line in BlockCountries includes the levels and priority.
# chkconfig: 2345 10 92
5 is normal timesharing.
The level 10 was picked for Fedora, but seems to work for everyone else. You can adjust it. It needs to start after networking & after iptables/ip6tables
. And after any filesystems that it/Perl require.
Are the links in /etc/rc5.d
present? Did you do chkconfig on
as well as --add
?
I don't know why it wouldn't run at startup, unless your distribution isn't running sysV init. Newer systems use systemd for startup, but these provide sysV compatibility. Some systems may want LSB stanzas - I suppose I could provide one, but it hasn't come up;
What makes you think that it's not?
The startup terminal/log should show [ FAILED ] if something fails, or [ OK ].
Check syslog. Make sure that BlockCountries is accessible & executable. And ownership/permissions on the startup directories. Make sure that Perl is in or linked to from /usr/bin/perl
. Make sure that SeLinux (or equivalent) isn't blocking execution. For SeLinux, audit2allow -lb
usually will tell you what's happening.
For the crontab entry: is crond running? Are other cron jobs running? Have you checked /var/log/cron
(or equiv)? You've specified 1308 daily. Is that what you expect? Did you edit the file with crontab or HUP crond? Are you using /etc/crontab
or the user-specific /var/spool/cron/<user>
? Did you add CRONJOB=1
to the table, which causes cron-optimized output? Why don't you specify a day of the week? daily updates aren't likely to be beneficial.
And again, check file ownerships, permissions & SeLinux.
This is all local system management stuff, and there is no indication of a BlockCountries bug. So I've marked this Invalid.
FWIW, startup and cron of BlockCountries work reliably here with the commands/configuration as documented.
Since I mentioned its absence in my reply, I've added an LSB init stanza for those systems that honor (or require) one.
I've also updated the documentation to mention update-rc.d
& system-ctl
in addition to chkconfig
.
These have been released as V2.7.
Have you resolved your startup problems? If so, I would like to close this issue. If not, please perform the troubleshooting steps provided above and provide answers to the questions.
Since I haven't heard any more about your issue, I'm closing this.
Feel free to re-open if you have more data.
av00va writes:
I found out that your script isn't loading automatically at startup. It is listed in chkconfig
BlockCountries 0:off 1:off 2:on 3:on 4:on 5:on 6:off
I didn't see any documentation as to which levels and start/stop priority it should have. Please let me know, thanks. Also, I feel as if crontab isn't functioning correctly:
8 13 * * * /etc/init.d/BlockCountries start -update