Subversion Repositories ALCASAR

Rev

Rev 2138 | Rev 2177 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2138 Rev 2175
Line 86... Line 86...
86
			{
86
			{
87
			$line ="\nuamdomain=\"" . trim($_POST['add_uamdomain']) . "\" #" . trim($_POST['add_domain_comment']);
87
			$line ="\nuamdomain=\"" . trim($_POST['add_uamdomain']) . "\" #" . trim($_POST['add_domain_comment']);
88
			$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
88
			$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
89
			fwrite ($pointeur, $line);
89
			fwrite ($pointeur, $line);
90
			fclose ($pointeur);
90
			fclose ($pointeur);
-
 
91
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh"); # Clean & sort conf files. Add uamallowed domains to the dns-blackhole conf
91
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
92
			exec ("sudo /usr/bin/systemctl restart dnsmasq-blackhole");
-
 
93
			sleep 1 # be sure that dnsmasq-blackhole is restarted before killing tun0 ! 
92
			exec ("sudo /usr/bin/systemctl restart chilli");
94
			exec ("sudo /usr/bin/systemctl restart chilli");
93
			}
95
			}
94
		}
96
		}
95
	break;
97
	break;
96
	case 'change_uamdomain' :
98
	case 'change_uamdomain' :
Line 120... Line 122...
120
				fwrite($pointeur,$ligne);
122
				fwrite($pointeur,$ligne);
121
				}
123
				}
122
			}
124
			}
123
		fclose($pointeur);
125
		fclose($pointeur);
124
		}
126
		}
-
 
127
	exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
-
 
128
	exec ("sudo /usr/bin/systemctl restart dnsmasq-blackhole");
-
 
129
	sleep 1 # be sure that dnsmasq-blackhole is restarted before killing tun0 ! 
125
	exec ("sudo /usr/bin/systemctl restart chilli");
130
	exec ("sudo /usr/bin/systemctl restart chilli");
126
	break;
131
	break;
127
	case 'new_ip' :
132
	case 'new_ip' :
128
	if (trim($_POST['add_ip']) != "") 
133
	if (trim($_POST['add_ip']) != "") 
129
		{
134
		{
Line 179... Line 184...
179
				fwrite($pointeur,$ligne);
184
				fwrite($pointeur,$ligne);
180
				}
185
				}
181
			}
186
			}
182
		fclose($pointeur);
187
		fclose($pointeur);
183
		}
188
		}
-
 
189
	exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
184
	exec ("sudo /usr/bin/systemctl restart chilli");
190
	exec ("sudo /usr/bin/systemctl restart chilli");
185
	break;
191
	break;
186
	}
192
	}
187
}
193
}
188
?>
194
?>