I have the following simple script IPN in CentOS 6.5 in /etc/init.d/
#!/bin/sh
# chkconfig: 2345 05 06
cd /root/IPNHost
. /etc/rc.d/init.d/functions
start() {
echo -n $"Starting..."
/root/IPNHost/IPNHost
}
stop() {
echo -n $"Stopping ..."
killproc IPNHost
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status IPNHost
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
esac
exit 0
I have done the chkconfig stuff and realized that the script doesn't load successfully on startup. When I run
/etc/init.d/IPN start
it works perfectly fine.
However, when I do
service IPN start
It gives me "error while loading shared libraries: libippcore.so.7.0: cannot open shared object file: No such file or directory.
How do I get IPN to see the IPP environment variables (consisting of the above library) when I run it using service IPN start? I assume this is why the service did not start when I rebooted the system.