domotigaServer on startup
Moderator: RDNZL
domotigaServer on startup
hello
i am new on domotiga and just installed it on a sheevaplug
i have configured a zwave and 1wire network
now i would like to make domotigaServer start automaticaly when the server start
i have found how to start automaticaly owfs as server but i don't find how to do this for domotiga
i have tried to make a script in init.d with domotigaserver.gambas but it don't work
i have to login and launch it manually
can someone help me ?
thx
i am new on domotiga and just installed it on a sheevaplug
i have configured a zwave and 1wire network
now i would like to make domotigaServer start automaticaly when the server start
i have found how to start automaticaly owfs as server but i don't find how to do this for domotiga
i have tried to make a script in init.d with domotigaserver.gambas but it don't work
i have to login and launch it manually
can someone help me ?
thx
- RDNZL
- Forum Moderator
- Posts: 1008
- Joined: Sun Sep 24, 2006 1:45 pm
- Location: Dordrecht, The Netherlands
- Contact:
Re: domotigaServer on startup
Look at example script 'domotiga.fedora' in domotiga tools directory
http://domotiga.nl/projects/domotiga/wi ... nit-Script
or upstart wiki
http://domotiga.nl/projects/domotiga/wi ... er-Upstart
http://domotiga.nl/projects/domotiga/wi ... nit-Script
or upstart wiki
http://domotiga.nl/projects/domotiga/wi ... er-Upstart
Regards, Ron.
Re: domotigaServer on startup
aie aie aie
I tried since 2 days to make this work but i can't
I have made in the init.d a script and the domotigaserver start when i launch /etc/init.d/domotigaserver start
the file is executable and i have made the links with update-rc.d domotigaserver defaults
but it didn't launch automaticaly when the server start
I tried since 2 days to make this work but i can't
I have made in the init.d a script and the domotigaserver start when i launch /etc/init.d/domotigaserver start
the file is executable and i have made the links with update-rc.d domotigaserver defaults
but it didn't launch automaticaly when the server start
Re: domotigaServer on startup
Isno,
You're running a sheevaplug with what distribution of linux?
Fedora, Suse, Debian, ubuntu, slackware, Mint ... gentoo?
You're running a sheevaplug with what distribution of linux?
Fedora, Suse, Debian, ubuntu, slackware, Mint ... gentoo?
If you can't fix it with a hammer, you've got an electrical problem!
Fibaro HC2, various z-wave switching, alerting, detection modules.
ELV FHT80b heating system.
Fibaro HC2, various z-wave switching, alerting, detection modules.
ELV FHT80b heating system.
Re: domotigaServer on startup
Hello, i'm another guy usinn an arm5v to run Domotiga Server. My problems are similar.jrkalf wrote:Isno,
You're running a sheevaplug with what distribution of linux?
Fedora, Suse, Debian, ubuntu, slackware, Mint ... gentoo?
I'm running Debian Squeeze, and the script for uspstart doesn't work.
I got this error running the script from terminal:
Code: Select all
cmr@Iconnect:~/domotiga/rrd/graphs$ /etc/init.d/domotiga.conf start ..
/etc/init.d/domotiga.conf: line 6: syntax error near unexpected token `('
/etc/init.d/domotiga.conf: line 6: `start on (net-device-up'
Some commands are different is this distro, look at the script:
Code: Select all
# DomotiGa Server Service
# description: DomotiGaServer Service
# author: Ron Klinkien <info@domotiga.nl>
start on (net-device-up
and started mysql
and runlevel [2345])
stop on runlevel [016]
# tell upstart we're creating a daemon
# upstart manages PID creation for you.
respawn
respawn limit 5 5
# configuratio variables
env DOMO_USER=cmr
env GBX2=/usr/local/bin/gbx2
env GBC2=/usr/local/bin/gbc2
env GBC2_OPTS=-pam
# Execute the program
cd /home/cmr/domotiga/DomotiGaServer
pre-start exec sudo -H -n -u $DOMO_USER $GBC2 $GBC2_OPTS
exec sudo -H -n -u $DOMO_USER $GBX2 > /dev/null 2>&1
Carlos
Re: domotigaServer on startup
I'm unaware debian is using upstart already for starting processes. Can you verify this? I've found a few articles in which the switch to upstart was discussed, but I've not been able to investigate further.cmrdomo wrote:Hello, i'm another guy usinn an arm5v to run Domotiga Server. My problems are similar.jrkalf wrote:Isno,
You're running a sheevaplug with what distribution of linux?
Fedora, Suse, Debian, ubuntu, slackware, Mint ... gentoo?
I'm running Debian Squeeze, and the script for uspstart doesn't work.
I got this error running the script from terminal:Can you help me making a script for autostart at boot?Code: Select all
cmr@Iconnect:~/domotiga/rrd/graphs$ /etc/init.d/domotiga.conf start .. /etc/init.d/domotiga.conf: line 6: syntax error near unexpected token `(' /etc/init.d/domotiga.conf: line 6: `start on (net-device-up'
If so, the net-device-up which is a ubuntu specific command isn't available in debian squeeze. It probably uses another script to verify the network interfaces are up and running. Perhaps you should have a look in your /etc/init directory and find out which script is used. Another option is to remove "net-device-up" from the startup script as it's mostlikely already covered by mysql. I just put it in as a precautionairy measure to make sure network is up and running because I have a ip-socket connection to a device on my network and domotiga won't communicate with it unless the network is up and running.
# DomotiGa Server Service
# description: DomotiGaServer Service
# author: Ron Klinkien <info@domotiga.nl>
start on (net-device-up
and started mysql
and runlevel [2345])
stop on runlevel [016]
# tell upstart we're creating a daemon
# upstart manages PID creation for you.
respawn
respawn limit 5 5
# configuratio variables
env DOMO_USER=cmr
env GBX2=/usr/local/bin/gbx2
env GBC2=/usr/local/bin/gbc2
env GBC2_OPTS=-pam
# Execute the program
cd /home/cmr/domotiga/DomotiGaServer
pre-start exec sudo -H -n -u $DOMO_USER $GBC2 $GBC2_OPTS
exec sudo -H -n -u $DOMO_USER $GBX2 > /dev/null 2>&1
If you can't fix it with a hammer, you've got an electrical problem!
Fibaro HC2, various z-wave switching, alerting, detection modules.
ELV FHT80b heating system.
Fibaro HC2, various z-wave switching, alerting, detection modules.
ELV FHT80b heating system.
Re: domotigaServer on startup
Hi!
I removed the lines as you suggested.
But now i got an error like:
/etc/init.d/domotiga.conf: 21: pre-start: not found
I used apt-get to install upstart. Can i revert it? can i uninstall upstart and install other app to run scripts?
Do you know what app Squeeze uses by default? I don't remember what i have before.
regards,
Carlos
I removed the lines as you suggested.
But now i got an error like:
/etc/init.d/domotiga.conf: 21: pre-start: not found
I used apt-get to install upstart. Can i revert it? can i uninstall upstart and install other app to run scripts?
Do you know what app Squeeze uses by default? I don't remember what i have before.
regards,
Carlos
Re: domotigaServer on startup
Mmmmpfh debian....cmrdomo wrote:Hi!
I removed the lines as you suggested.
But now i got an error like:
/etc/init.d/domotiga.conf: 21: pre-start: not found
I used apt-get to install upstart. Can i revert it? can i uninstall upstart and install other app to run scripts?
Do you know what app Squeeze uses by default? I don't remember what i have before.
regards,
Carlos
I'm unaware of the debian make-up. You should have checked if it used the upstart system natively or have used the redhat init script. You can probably still use the redhat script anyway. Most systems with upstart allow for legacy scripts to be started as well.
I'm not sure what the shortcomings of your upstart installation are, it'll be hard to script to that.
If you can't fix it with a hammer, you've got an electrical problem!
Fibaro HC2, various z-wave switching, alerting, detection modules.
ELV FHT80b heating system.
Fibaro HC2, various z-wave switching, alerting, detection modules.
ELV FHT80b heating system.
Re: domotigaServer on startup
Hi!
Can explain how the script above works?
Why do I have to pre-start?
Why can't I put something like:
./home/Domotiga/domotigaserver.gambas
to start the program?
Also I don't understand the options -h -n or -u
can you shed some light over this subject?
Carlos
Can explain how the script above works?
Why do I have to pre-start?
Why can't I put something like:
./home/Domotiga/domotigaserver.gambas
to start the program?
Also I don't understand the options -h -n or -u
can you shed some light over this subject?
Carlos
Re: domotigaServer on startup
As for the pre-start part, we love to do that to know gambas recompiles the server component each time it starts. Ensuring you run the latest version.cmrdomo wrote:Hi!
Can explain how the script above works?
Why do I have to pre-start?
Why can't I put something like:
./home/Domotiga/domotigaserver.gambas
to start the program?
Also I don't understand the options -h -n or -u
can you shed some light over this subject?
Carlos
This is because in most svn commits ron doesn't update the .gambas file, merely the .class files. So if he asks you to update from the svn tree and restart the application, the script will automagically recompile the latest domotigaserver on the fly

For the -h -n -u options, please refer to the sudo manual. I can spell it out, but often the product manual is the best way to learn how the product works to begin with.
If you can't fix it with a hammer, you've got an electrical problem!
Fibaro HC2, various z-wave switching, alerting, detection modules.
ELV FHT80b heating system.
Fibaro HC2, various z-wave switching, alerting, detection modules.
ELV FHT80b heating system.
Re: domotigaServer on startup
If Domotigaserver starts from the command line, put it in /etc/rc.local (chmod +x to make it executable)
I run all kinds of stuff on my Sheevaplug running Debian
I have No-ip scripts, rtorrent, ntp servers, camera servers (motion) and get_iplayer running.
It works fine
I might have a go at Domotiga too this Spring....
I run all kinds of stuff on my Sheevaplug running Debian
I have No-ip scripts, rtorrent, ntp servers, camera servers (motion) and get_iplayer running.
It works fine
