![]() |
writing an init script?
im trying to write a initscript to run the command
portfwd -c pf.conf but tbh i dunno how to do it. #!/bin/bash # # Init file for portfwd # # chkconfig: 2345 55 25 # description: portfwd # portfwd -c /usr/local/sbin/pf.conf but it doesnt work portfwd is in /usr/local/sbin/ id be gratefull if someone could tell me where im going wrong? running portfwd -c /usr/local/sbin/pf.conf from the commandline works but i need it to be run on startup |
Re: writing an init script?
If I remember correctly, when an init script runs the paths aren't set
so to get this to run, you'd need to put: #!/bin/bash # # Init file for portfwd # # chkconfig: 2345 55 25 # description: portfwd # /usr/local/sbin/portfwd -c /usr/local/sbin/pf.conf I am certain this is correct for CRON jobs and am pretty sure its the same for init scripts! |
Re: writing an init script?
THANKYOU :D worked a treat
|
Re: writing an init script?
yay! do i get a rep? :)
Edit: Cheers ;) |
| All times are GMT. The time now is 04:15. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum