You are not logged in.
Pages: 1
Is it possible to create a deamon for resin and how...
I have follow the guides by resin , but that doesen´t work????
What is the sript in rc.d called by filetype ??? resin.sh
Then when I look into rc.d I doesent look like the others deamon???
So how do I do that instead of manual starting the resin webserver each its reboots ????
THX
Just getting better .... All the time
Offline
You should probably write your own script much like the existing daemons in /etc/rc.d/, but follow the setup for the one that comes with resin (the one with resin is probably a SysV style initscript).
Offline
I have follow the one....
But it´s not workin... I hvae made a scrit called resin.sh with following :
(this is the standart - i have put in the correct dir instead.
#!/bin/sh
JAVA_HOME=/usr/java
RESIN_HOME=/usr/local/resin
SERVER_ROOT=/usr/local/web
export JAVA_HOME
export RESIN_HOME
export SERVER_ROOT
$RESIN_HOME/bin/httpd.sh
Just getting better .... All the time
Offline
That looks like a /etc/profile.d script, not an /etc/rc.d script. It sets up variables for the home, but it doesn't start a network or anything.
Dusty
Offline
But it´s not workin...
That means nothing to me.
read: /dev/your_mind: No such file or directory
What doesn't work? What are the error messages? What have you tried? What evidence do you have that it's not working?
Offline
That looks like a /etc/profile.d script, not an /etc/rc.d script. It sets up variables for the home, but it doesn't start a network or anything.
Dusty
Agreed,
just put that script in /etc/profile.d and make it executable and t should work, another solution is to put the (or a path to the code) in rc.local
http://www.linuxportalen.com -> Linux Help portal for Linux and ArchLinux (in swedish)
Dell Inspiron 8500
Kernel 2.6.14-archck1 (selfcompiled)
Enlightenment 17
Offline
Think I got the answer other ways around
But thanks anyway everybody...
The thing i wanted to do, was creating a deamon that starts resin at boot time.. thats it ?
Just getting better .... All the time
Offline
Yeah, we got that - speaking for myself, though, I was never sure from your posts what exactly you had tried to do, and what was not working.
Glad you got the answer, anyway.
Offline
Its was how to create the deamon...I´m not into how to make the scripts and I did try the way Resin explain it - but that didn´t work..
so here is what the solution was:
in rc.local/resin.sh
RESIN_HOME=/opt/resin
export RESIN_HOME
And then make a script and put in /etc/rc.d called resind
#!/bin/bash
#
# RESIND - Resin Http Server Daemon
#
# Autor: S.M. Masi:x
# Date: 15.11.2005.
# Version 1.1 M:X
#
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/profile.d/resin.sh
. /etc/profile.d/j2sdk.sh
case "$1" in
start)
stat_busy "Starting Resin web server"
$RESIN_HOME/bin/httpd.sh start &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon resin
stat_done
fi
;;
stop)
stat_busy "Stopping Resin web server"
$RESIN_HOME/bin/httpd.sh stop &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon resin
stat_done
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
The script is from a friend from school - so THX MASI
hope others can use it...
Just getting better .... All the time
Offline
In the start) section, you should have add_daemon, not rm_daemon. Have a look at some of the other scripts in /etc/rc.d for guidance.
Offline
Pages: 1