Commit b30d7406 authored by Franco Fichtner's avatar Franco Fichtner

rc: drop occasional .sh suffix for consistency

parent 22a3d39e
......@@ -649,7 +649,7 @@
<month>*</month>
<wday>*</wday>
<who>root</who>
<command>/usr/local/etc/rc.update_bogons.sh</command>
<command>/usr/local/etc/rc.update_bogons</command>
</item>
<item>
<minute>*/60</minute>
......
......@@ -378,7 +378,7 @@ function convert_config() {
if (is_array($config['cron'])) {
$cron_item_count = count($config['cron']['item']);
for($x=0; $x<$cron_item_count; $x++) {
if(stristr($config['cron']['item'][$x]['command'], "rc.update_bogons.sh")) {
if(stristr($config['cron']['item'][$x]['command'], 'rc.update_bogons')) {
if($config['cron']['item'][$x]['hour'] == "*" ) {
$config['cron']['item'][$x]['hour'] = "3";
write_config(gettext("Updated bogon update frequency to 3am"));
......
......@@ -426,7 +426,7 @@ function upgrade_025_to_026() {
$cron_item['month'] = "*";
$cron_item['wday'] = "*";
$cron_item['who'] = "root";
$cron_item['command'] = "/usr/local/etc/rc.update_bogons.sh";
$cron_item['command'] = "/usr/local/etc/rc.update_bogons";
$config['cron']['item'][] = $cron_item;
......@@ -2031,7 +2031,7 @@ function upgrade_054_to_055() {
enable_rrd_graphing();
/* Let's save the RRD graphs after we run enable RRD graphing */
/* The function will restore the rrd.tgz so we will save it after */
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/cf/conf' /usr/local/etc/rc.backup_rrd.sh");
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/cf/conf' /usr/local/etc/rc.backup_rrd");
unlink_if_exists("{$g['vardb_path']}/rrd/*.xml");
if ($g['booting'])
echo "Updating configuration...";
......@@ -2713,7 +2713,7 @@ function upgrade_080_to_081() {
enable_rrd_graphing();
/* Let's save the RRD graphs after we run enable RRD graphing */
/* The function will restore the rrd.tgz so we will save it after */
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/cf/conf' /usr/local/etc/rc.backup_rrd.sh");
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/cf/conf' /usr/local/etc/rc.backup_rrd");
if ($g['booting'])
echo "Updating configuration...";
foreach($config['filter']['rule'] as & $rule) {
......@@ -3046,7 +3046,7 @@ function upgrade_095_to_096() {
enable_rrd_graphing();
/* Let's save the RRD graphs after we run enable RRD graphing */
/* The function will restore the rrd.tgz so we will save it after */
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/cf/conf' /usr/local/etc/rc.backup_rrd.sh");
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/cf/conf' /usr/local/etc/rc.backup_rrd");
}
function upgrade_096_to_097() {
......
......@@ -19,8 +19,8 @@ DISK_NAME=`/bin/df /var/db/rrd | /usr/bin/tail -1 | /usr/bin/awk '{print $1;}'`
DISK_TYPE=`/usr/bin/basename ${DISK_NAME} | /usr/bin/cut -c1-2`
# If we are not on a full install, or if the full install wants RAM disks, or if the full install _was_ using RAM disks, but isn't for the next boot...
if [ "${PLATFORM}" != "pfSense" ] || [ ${USE_MFS_TMPVAR} -gt 0 ] || [ "${DISK_TYPE}" = "md" ]; then
/usr/local/etc/rc.backup_rrd.sh
/usr/local/etc/rc.backup_dhcpleases.sh
/usr/local/etc/rc.backup_rrd
/usr/local/etc/rc.backup_dhcpleases
fi
sleep 1
......
......@@ -32,6 +32,6 @@ DISK_NAME=`/bin/df /var/db/rrd | /usr/bin/tail -1 | /usr/bin/awk '{print $1;}'`
DISK_TYPE=`/usr/bin/basename ${DISK_NAME} | /usr/bin/cut -c1-2`
# If we are not on a full install, or if the full install wants RAM disks, or if the full install _was_ using RAM disks, but isn't for the next boot...
if [ "${PLATFORM}" != "pfSense" ] || [ ${USE_MFS_TMPVAR} -gt 0 ] || [ "${DISK_TYPE}" = "md" ]; then
/usr/local/etc/rc.backup_rrd.sh
/usr/local/etc/rc.backup_dhcpleases.sh
/usr/local/etc/rc.backup_rrd
/usr/local/etc/rc.backup_dhcpleases
fi
......@@ -57,17 +57,17 @@ process_url() {
fi
}
echo "rc.update_bogons.sh is starting up." | logger
echo "rc.update_bogons is starting up." | logger
# Sleep for some time, unless an argument is specified.
if [ "$1" = "" ]; then
# Grab a random value
value=`od -A n -d -N2 /dev/random | awk '{ print $1 }'`
echo "rc.update_bogons.sh is sleeping for $value" | logger
echo "rc.update_bogons is sleeping for $value" | logger
sleep $value
fi
echo "rc.update_bogons.sh is beginning the update cycle." | logger
echo "rc.update_bogons is beginning the update cycle." | logger
# Set default values if not overriden
v4url=${v4url:-"https://files.pfsense.org/lists/fullbogons-ipv4.txt"}
......@@ -80,7 +80,7 @@ process_url /tmp/bogonsv6 "${v6url}"
if [ "$proc_error" != "" ]; then
# Relaunch and sleep
sh /usr/local/etc/rc.update_bogons.sh &
sh /usr/local/etc/rc.update_bogons &
exit
fi
......@@ -145,8 +145,8 @@ fi
if [ "$checksum_error" != "" ]; then
# Relaunch and sleep
sh /usr/local/etc/rc.update_bogons.sh &
sh /usr/local/etc/rc.update_bogons &
exit
fi
echo "rc.update_bogons.sh is ending the update cycle." | logger
echo "rc.update_bogons is ending the update cycle." | logger
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2010 Jim Pingle
......@@ -59,7 +60,7 @@ if($_REQUEST['deleteall']) {
}
if((($tablename == "bogons") || ($tablename == "bogonsv6")) && ($_POST['Download'])) {
mwexec_bg("/usr/local/etc/rc.update_bogons.sh now");
mwexec_bg('/usr/local/etc/rc.update_bogons now');
$maxtimetowait = 0;
$loading = true;
while($loading == true) {
......
......@@ -187,15 +187,15 @@ if ($_POST) {
if ($_POST['bogonsinterval'] != $config['system']['bogons']['interval']) {
switch ($_POST['bogonsinterval']) {
case 'daily':
install_cron_job("/usr/local/etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "*");
install_cron_job("/usr/local/etc/rc.update_bogons", true, "1", "3", "*", "*", "*");
break;
case 'weekly':
install_cron_job("/usr/local/etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "0");
install_cron_job("/usr/local/etc/rc.update_bogons", true, "1", "3", "*", "*", "0");
break;
case 'monthly':
// fall through
default:
install_cron_job("/usr/local/etc/rc.update_bogons.sh", true, "1", "3", "1", "*", "*");
install_cron_job("/usr/local/etc/rc.update_bogons", true, "1", "3", "1", "*", "*");
}
$config['system']['bogons']['interval'] = $_POST['bogonsinterval'];
}
......
......@@ -195,11 +195,11 @@ if ($_POST) {
if (isset($_POST['rrdbackup'])) {
$config['system']['rrdbackup'] = $_POST['rrdbackup'];
install_cron_job("/usr/local/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
install_cron_job("/usr/local/etc/rc.backup_rrd", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
}
if (isset($_POST['dhcpbackup'])) {
$config['system']['dhcpbackup'] = $_POST['dhcpbackup'];
install_cron_job("/usr/local/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
install_cron_job("/usr/local/etc/rc.backup_dhcpleases", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
}
write_config();
......
......@@ -618,7 +618,7 @@
unset($config['wizardtemp']);
write_config();
reload_all();
mwexec_bg("/usr/local/etc/rc.update_bogons.sh now");
mwexec_bg("/usr/local/etc/rc.update_bogons now");
]]>
</stepafterformdisplay>
</step>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment