Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th December 2008, 03:18
staticanime staticanime is offline
Member
 
Join Date: Jul 2008
Location: Dundalk, Ireland
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to staticanime Send a message via MSN to staticanime Send a message via Yahoo to staticanime Send a message via Skype™ to staticanime
Default need help making boot script for unrealIRCd

Can anyone help/make me a script to be up in /etc/init.d/ to start, stop, restart & reload unreal-ircd??

All the info needed is here (screenshot from the AdmIRC module for Webmin)
Reply With Quote
Sponsored Links
  #2  
Old 27th December 2008, 13:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Which distribution are you using? How did you install unreal-ircd?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 27th December 2008, 17:25
staticanime staticanime is offline
Member
 
Join Date: Jul 2008
Location: Dundalk, Ireland
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to staticanime Send a message via MSN to staticanime Send a message via Yahoo to staticanime Send a message via Skype™ to staticanime
Default

Quote:
Originally Posted by falko View Post
Which distribution are you using? How did you install unreal-ircd?
I installed Unreal-ircD 3.2.7 from source, and I'm running Ubuntu server 8.04.1

EDIT: I managed to get it working by editing the script /usr/share/unreal-ircd/unreal and changed the path to the binary
EDIT2: Or maybe not

Anyway, here is my bootscript stored in /etc/init.d/unrealircd
Code:
#!/bin/sh
# Starts and stops UnrealIRCd

case "$1" in
'start')
	su - unreal
        /usr/share/unreal-ircd/unreal start
        RETVAL=$?
        ;;
'stop')
        /usr/share/unreal-ircd/unreal stop
        RETVAL=$?
        ;;
'restart')
        /usr/share/unreal-ircd/unreal restart
        RETVAL=$?
        ;;
*)
        echo "Usage: $0 { start | stop | restart}"
        RETVAL=1
        ;;
esac
exit $RETVAL
but it doesn't work too well, it just seems to run the su - unreal command, it won't run any other commands until I type exit in the unreal shell :S

PS. the user unreal has the home directory of /usr/share/unreal-ircd/, and has full ownership of all files related to unrealIRCd, if that helps.
PPS the reason for the su - unreal is cause I don't want the daemon running as root

Last edited by staticanime; 27th December 2008 at 20:14.
Reply With Quote
  #4  
Old 28th December 2008, 13:12
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Quote:
Originally Posted by staticanime View Post
PPS the reason for the su - unreal is cause I don't want the daemon running as root
What happens when you leave it out? I think the server should be started as root - it might then switch to another user afterwards (don't now unreal-ircd, but that's how many other daemons do it).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 28th December 2008, 13:16
staticanime staticanime is offline
Member
 
Join Date: Jul 2008
Location: Dundalk, Ireland
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to staticanime Send a message via MSN to staticanime Send a message via Yahoo to staticanime Send a message via Skype™ to staticanime
Default

Yeah, the IRC daemon just stays running as root if I leave out the su - unreal, so I'm stumped :S
Reply With Quote
  #6  
Old 29th December 2008, 11:19
zcworld zcworld is offline
Senior Member
 
Join Date: Jul 2006
Location: South Australia
Posts: 329
Thanks: 2
Thanked 37 Times in 37 Posts
Send a message via MSN to zcworld Send a message via Skype™ to zcworld
 
Default

ok
not sure if you installed yours from an package or compile / config it fully yourself if you installed from an packaged than it maybe bit a tad diff from this ...
this is what i used for mine due to i compile it myself hope its helps out a little


** UPDATE ** i re read your post
change the path to the file and than try it see if thats works for you
to see if it works or not make sure the server is stoped and have an IRC client trying to connect to your box IP and wait 4 mins
if connected than its works if not arrr yell out
PS ... i would of used the /home folder to install / run the IRCD from .. but thats just me

heads up if its works nor not
try this
log into your irc user account <i used ircadmin>
than
check ur ~/bin folder to see if you got a file called "ircdchk"

if so than you run this command
crontab -e
add in to the crontab window this line
*/2 * * * * /home/ircadmin/bin/ircdchk >/dev/null 2>&1


save it

when your server boots it will check to see if the server is running every two mins if not it will start it
and if the server was running and crashed or stoped it and didn't restart it , it will auto restart it for you as far as i can remember

its being a while

hope its helps

and remember to do this as the IRCADMIN user or what you call it


if you dont have the file called " ircdchk"

do an search for it on your system and see if you can find it
__________________
Shane Ebert :: Facebok

Last edited by zcworld; 30th December 2008 at 01:21. Reason: update
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sql ledger using forum.. yurtboy1 General 19 25th December 2010 21:08
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
Internet Explorer won't connect to my server wctaelectronics Server Operation 10 27th October 2008 21:14
ISPConfig install issues... flyingaggie Installation/Configuration 2 18th July 2008 10:46
linux boot process sysconfig Server Operation 0 4th November 2006 09:58


All times are GMT +2. The time now is 15:20.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.