$mode = UPDATENOTIFY_MODE_MODIFIED; } else { $a_rsyncclient[] = $rsyncclient; $mode = UPDATENOTIFY_MODE_NEW; } updatenotify_set("rsyncclient", $mode, $rsyncclient['uuid']); write_config(); if (!empty($_POST['Submit']) && stristr($_POST['Submit'], gettext("Execute now"))) { $retval = 0; // Update scripts and execute it. config_lock(); $retval |= rc_exec_service("rsync_client"); $retval |= rc_update_service("cron"); config_unlock(); if ($retval == 0) { updatenotify_clear("rsyncclient", $rsyncclient['uuid']); } $retval |= rc_exec_script("su -m {$rsyncclient['who']} -c '/bin/sh /var/run/rsync_client_{$rsyncclient['uuid']}.sh'"); $savemsg = get_std_save_message($retval); } else { header("Location: services_rsyncd_client.php"); exit; } } } include "fbegin.inc"; ?> <script type="text/javascript"> <!-- function set_selected(name) { document.getElementsByName(name)[1].checked = true;
$mode = UPDATENOTIFY_MODE_MODIFIED; } else { $a_rsynclocal[] = $rsynclocal; $mode = UPDATENOTIFY_MODE_NEW; } updatenotify_set("rsynclocal", $mode, $rsynclocal['uuid']); write_config(); if (!empty($_POST['Submit']) && stristr($_POST['Submit'], gettext("Execute now"))) { $retval = 0; // Update scripts and execute it. config_lock(); $retval |= rc_exec_service("rsync_local"); $retval |= rc_update_service("cron"); config_unlock(); if ($retval == 0) { updatenotify_clear("rsynclocal", $rsynclocal['uuid']); } $retval |= rc_exec_script("su -m {$rsynclocal['who']} -c '/bin/sh /var/run/rsync_local_{$rsynclocal['uuid']}.sh'"); $savemsg = get_std_save_message($retval); } else { header("Location: services_rsyncd_local.php"); exit; } } } include "fbegin.inc"; ?> <script type="text/javascript"> <!-- function set_selected(name) { document.getElementsByName(name)[1].checked = true;