Chitambira Posted December 7, 2004 Share Posted December 7, 2004 I am installing qmail. I copied qmailctl.txt file that i downloaded from some site, I copied it to /var/qmail/bin/qmailctl I chmod 755 the file, I made symlink in /usr/bin/. I try to run it and it says: Bad interpreter: No such file or directory /var is on patition with defaults 1 2 in its fstab entry other scripts in /var/qmail/bin run properly Can somebody help!!!!!!!!!!! here is the script -------------------------------------------------------------------- #!/bin/sh # description: the qmail MTA PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin export PATH QMAILDUID=`id -u qmaild` NOFILESGID=`id -g qmaild` case "$1" in start) echo "Starting qmail" if svok /service/qmail-send ; then svc -u /service/qmail-send /service/qmail-send/log else echo "qmail-send supervise not running" fi if svok /service/qmail-smtpd ; then svc -u /service/qmail-smtpd /service/qmail-smtpd/log else echo "qmail-smtpd supervise not running" fi if [ -d /var/lock/subsys ]; then touch /var/lock/subsys/qmail fi ;; stop) echo "Stopping qmail..." echo " qmail-smtpd" svc -d /service/qmail-smtpd /service/qmail-smtpd/log echo " qmail-send" svc -d /service/qmail-send /service/qmail-send/log if [ -f /var/lock/subsys/qmail ]; then rm /var/lock/subsys/qmail fi ;; stat) svstat /service/qmail-send svstat /service/qmail-send/log svstat /service/qmail-smtpd svstat /service/qmail-smtpd/log qmail-qstat ;; doqueue|alrm|flush) echo "Flushing timeout table and sending ALRM signal to qmail-send." /var/qmail/bin/qmail-tcpok svc -a /service/qmail-send ;; queue) qmail-qstat qmail-qread ;; reload|hup) echo "Sending HUP signal to qmail-send." svc -h /service/qmail-send ;; pause) echo "Pausing qmail-send" svc -p /service/qmail-send echo "Pausing qmail-smtpd" svc -p /service/qmail-smtpd ;; cont) echo "Continuing qmail-send" svc -c /service/qmail-send echo "Continuing qmail-smtpd" svc -c /service/qmail-smtpd ;; restart) echo "Restarting qmail:" echo "* Stopping qmail-smtpd." svc -d /service/qmail-smtpd /service/qmail-smtpd/log echo "* Sending qmail-send SIGTERM and restarting." svc -t /service/qmail-send /service/qmail-send/log echo "* Restarting qmail-smtpd." svc -u /service/qmail-smtpd /service/qmail-smtpd/log ;; cdb) tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp chmod 644 /etc/tcp.smtp.cdb echo "Reloaded /etc/tcp.smtp." ;; help) cat <<HELP stop -- stops mail service (smtp connections refused, nothing goes out) start -- starts mail service (smtp connection accepted, mail can go out) pause -- temporarily stops mail service (connections accepted, nothing leaves) cont -- continues paused mail service stat -- displays status of mail service cdb -- rebuild the tcpserver cdb file for smtp restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it doqueue -- schedules queued messages for immediate delivery reload -- sends qmail-send HUP, rereading locals and virtualdomains queue -- shows status of queue alrm -- same as doqueue flush -- same as doqueue hup -- same as reload HELP ;; *) echo "Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}" exit 1 ;; esac exit 0 ------------------------------------------------------------------------------------ Link to comment https://www.neowin.net/forum/topic/254037-qmail-installation/ Share on other sites More sharing options...
markwolfe Veteran Posted December 7, 2004 Veteran Share Posted December 7, 2004 This is not a "how to" guide to address a FAQ, so I am moving it to the general Open Source Disucssion area... * thread moved * Link to comment https://www.neowin.net/forum/topic/254037-qmail-installation/#findComment-585058224 Share on other sites More sharing options...
mr_daemon Posted December 9, 2004 Share Posted December 9, 2004 You never know, but try changing the interpreter to #!/bin/bash Make sure it is the utmost absolute first line. Also try running the script this way, just to see: # sh /var/qmail/bin/qmailctl or # source /var/qmail/bin/qmailctl If of course your shell is bash. I find this to be a very strange problem, this script sounds fine -- it probably just has a malformed shebang line... One ressource that was particularily useful when I first installed qmail: http://www.lifewithqmail.com I now set it up almost blindly -- to the point where I gave myself a challenge and installed it with vpopmail and courrier-*. Link to comment https://www.neowin.net/forum/topic/254037-qmail-installation/#findComment-585069400 Share on other sites More sharing options...
X-Istence Posted January 18, 2005 Share Posted January 18, 2005 Looks like /bin/sh does not exist. On most standard linux installs it points to /bin/bash, check with ls -al /bin/sh, and if needed ln -s /bin/bash /bin/sh Link to comment https://www.neowin.net/forum/topic/254037-qmail-installation/#findComment-585316617 Share on other sites More sharing options...
Recommended Posts