|
| ||||||||||
| Tags: apache, bash script, cgi, opensuse, perl, samba, server, smb conf |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Problems while running Bash script with Perl
Code: #! / Usr / bin / perl-w
use strict;
use CGI:: Carp qw (fatalsToBrowser);
print "Content-type: text / html \ n \ n";
$ SIG (CHLD) = 'IGNORE';
unless (fork ()) (
exec ('/ bin / test.sh');
exit (0);
) ![]() |
|
#2
| ||||
| ||||
| Re: Problems while running Bash script with Perl
I am having much queries on your problem. If the file because / adapted touch? How do you call the script from the console? What are the permissions of the scripts so far? I think that you should be definitely using the test.sh file. So I would like to recommend you to provide the test.sh file, so that it could be easy for us to understand. Also there are chances that you might be using the coding of test.sh file incorrectly. |
|
#3
| |||
| |||
| Re: Problems while running Bash script with Perl Quote:
Code: # / Bin / bash test touch / echo "a test">> / test mv / test / srv / www / test cat / srv / www / test Thanks in advance. |
|
#4
| ||||
| ||||
| Re: Problems while running Bash script with Perl
And yet a basic question ... why even use bash? You can and should do EVERYTHING with a language and system calls to avoid. Otherwise, my guess is that your apache is running with a rating of your perl script can run your bash script, respectively incorrect. Debug but the best times in the shell, ie lead your perl script out by hand and not via the browser. Also I think that using the chown the data folders / files, so it fits with the httpd process will help you. |
|
#5
| |||
| |||
| Re: Problems while running Bash script with Perl
The whole thing is designed for use in a classroom. There is an openSUSE 11.2 with Samba. The user should be able to use during class their usual drives, but during the tests will be different given the drives. Therefore, the change of the smb.conf. After the test back to the old shares will be made (that will again change the smb.conf) and also all the files from the Test folder to a new folder will be copied. The shell scripts to create FUNZ fine. But I can allow the teachers of this area can not access the server. Therefore, I wanted to make remotely run the scripts through the browser. Another possibility I have not found yet. Or it may be possible to realize all of Webmin? It is to be executed with a click, you can (after you have logged in with a password), so that I must deposit because none of the system commands just in Perl? ![]() |
|
#6
| |||
| |||
| Re: Problems while running Bash script with Perl Quote:
|
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Problems while running Bash script with Perl" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to create CGI script in bash? | Mulan | Software Development | 5 | 01-09-2010 08:19 PM |
| Create bash script for ftp | teenQ | Operating Systems | 4 | 04-03-2010 06:37 PM |
| Bash script if then else help | Unix'EM | Software Development | 3 | 18-08-2009 06:34 PM |
| Is it possible to execute Perl script within another script? | RasMus | Software Development | 2 | 21-07-2009 10:57 PM |
| Bash Script, read without new line | Kieran | Software Development | 2 | 06-02-2009 08:59 PM |