# How to Auto-restart Cups Service for printer



## fahmi888 (Oct 25, 2004)

my office always got electricity interupted.so,we need to start service everytime we switch on the Redhat server.So ,I need a script which can restart the service automatically when i swith on the Redhat server.plzz help me


----------



## Whiteskin (Nov 16, 2002)

That should be done by init. Add cups to your boot runlevel. I can't remember if RH has SysVstyle or BSD style init, so you will have to check that yourself. Check /etc/init.d, or /etc/rc.d Often there's a README inside these Directories.


----------



## fahmi888 (Oct 25, 2004)

i have checked rc.d and init.d but there is no README.
here are all the files--->

PBEAgent gpm krb5kdc postfix single
aep1000 halt kudzu privoxy smb
amd httpd linuxconf pxe snmpd
anacron hylafax lpd qpopper snmptrapd
apmd identd named radvd spamass-milter
arpwatch init.d netfs random spamassassin
atd ip6tables network rarpd squid
autofs ipchains nfs rawdevices sshd
bcm5820 iptables nfslock rhnsd syslog
bd irda nscd ripd tux
bgpd isdn ntpd ripngd vncserver
crond kadmin openprotect rstatd winbind
cups kdcrotate ospf6d rusersd xfs
dhcpd keytable ospfd rwalld xinetd
dhcrelay killall pcmcia rwhod ypbind
firstboot kprop poprelay saslauthd zebra
functions krb524 portmap sendmail


----------



## Whiteskin (Nov 16, 2002)

Which is there? rc.d or init.d


----------



## fahmi888 (Oct 25, 2004)

the file is from init.d....until now..atill dunno how to make it auto...


----------



## Whiteskin (Nov 16, 2002)

if it's init.d, then make a symlink from /etc/init.d/ to your current runlevel's directory. Or install webmin, and use it to set it up.


----------



## Squashman (Apr 4, 2003)

If it is a Red hat box, at the console prompt type setup and then select System Services. You can also run the chkconfig command to add services to the startup run levels.


----------

