#!/usr/bin/perl -w use CGI; my $cgi = new CGI; $id = $cgi -> param('id'); print "content-type:text/plain\n\n\n"; print "hello \n"; $sys = $id; &restart_vsftpd if($sys==1); &restart_php if($sys==2); &restart_nginx if($sys==3); &restart_server if($sys==4); sub restart_php { unless (system "/web/cgi/admin/c/cgi/php.sh &"){ print "We gave a date, OK!\n"; } } sub restart_vsftpd { system "/web/cgi/admin/c/cgi/vsftpd.sh"; } sub restart_nginx { system "/web/cgi/admin/c/cgi/nginx.sh"; } sub restart_server { system "/web/cgi/admin/c/cgi/reboot.sh"; } |
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |