CentOS 5 :: Custom Service Isn't Stopped?

Mar 17, 2009

I have a script in /etc/init.d that starts when the machine boots up, but doesn't stop when the the machine shuts down.This simple script recreates the problem. It just logs when the 'testservice' is started and stopped. When the shutdown -h now command is run, it should be called with the 'stop' parameter shouldn't it?

# Att /etc/init.d/testservice
#!/bin/sh
#

[code]....

View 12 Replies


ADVERTISEMENT

Programming :: BASH Scripting - Creating A Custom Service (CentOS)?

May 7, 2011

I am trying to create a custom service to manage a minecraft server what runs in a screen session (this is to allow easy console access as opposed to running it as a nohup background process). I am hitting two main issues with this script so far and wondering if anybody is able to shed some light on it, considering I am far from the greatest BASH scripter on Earth.

The issues are related to start and stop. the first issue with start is there is a command run "screen -dmS minecraft java -Xms1024M -Xmx1024M -jar /minecraft/minecraft.jar nogui" what doesn't appear to work, however when run from console (copy and pasted) this command seems to run perfectly. I am uncertain as to why this is not working within the script. Also if run from a script in /minecraft it also appears to work but in the minecraftd script I have created at /etc/init.d it does not work. I think the issue might be related to the location but am not certain on it, nor how to resolve it.

the second issue with stop is that it works sometimes but at other times it does not, overall it seems to work about 30~50% of the time. When it works it passes a couple of disconnection messages to the screen session and then gives the stop command (the command to gracefully terminate the minecraft server). It seems to work more often when using screen that I attach to the minecraft session while it is running but really not sure if this is an issue with my scripting or an issue with how I am passing things to screen.

The full code in /etc/init.d/minecraftd is below

Code:

#!/bin/bash
## Script Information
## Script Author: Berwick East

[code]....

View 9 Replies View Related

Debian Configuration :: Systemd Custom Service

Aug 4, 2015

On macbook air 6.2, i've installed a Debian jessie mate DE, dual boot using refind. I'm currently fine-tuning it. I've made a script following powertop advice:

Code: Select all[newb@debian /etc/systemd/system]$ cat mba_kb_sp.sh
#!/bin/sh
echo 'auto' > '/sys/bus/usb/devices/1-3.1/power/control';
echo 'auto' > '/sys/bus/usb/devices/1-3.2/power/control';
echo 'auto' > '/sys/bus/usb/devices/1-5/power/control';
exit 0

[Code] ....

All seems to work fine, however when i check the sys file it didn't change. But I can start manually the systemd service and, this time, it works.

View 2 Replies View Related

Ubuntu Servers :: Custom Service Start At Boot?

Jul 6, 2011

I have a few problems getting a custom service/daemon to auto-start at boot. I'm running ubuntu 11.04 Server amd64 edition. One of the services is a Teamspeak3 server I'm trying to start. I would like it to start up automatically on boot. ts3 already have a script with start/stop commands so all i have done is make a little script for it to get it to run as the correct user.

Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: ts3
# Required-Start: $all
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5

[Code]...

View 7 Replies View Related

General :: Make Shutdown Wait Until Service Is Stopped?

May 6, 2011

I have a third party application with a database.

I have created the service but it does not wait for the database to shutdown before the systems continues with the shutdown.

This results in the database being seen as crashed.

here is my stuff i did.

CACHE START AND STOP SCRIPT FOR REDHAT

#vi /home/cacheusr/cache_ctrl
Insert below
#!/bin/sh
#
# /etc/rc.d/init.d/cache_ctrl
# Cashier Control Script
#
# chkconfig: 2345 55 01
code....

View 9 Replies View Related

Ubuntu :: How To Print To Wireless Printer - CUPS Service Stopped

Dec 14, 2010

Trying to print from my laptop to friends wireless printer. I see his printer "7600 Series" in Network - File Browser. How do I print to his printer. I have text document. I click on "Print", but only "Print to file comes up".

I did System -> Printing -> Help -> Troubleshoot
Got: CUPS Service Stopped
The CUPS printer spooler does not appear to be running. To correct this choose
system -> Administration -> Services
There is not "Services there"
What to do? Ubuntu 10.04 LTS

View 9 Replies View Related

General :: Cron And Oracle Service Stopped Unexpectedly - Cannot Restart

May 5, 2010

I am running Fedora 11 with an Oracle 11g database installed. I came to check on it and found out that the oracle service had stopped. I also have a script that gets run by cron every minute. I noticed that the last entry in the log /var/log/cron was March 24 at 4:26. Which was really close (not exactly to the second but within a few minutes) of the last log entry in the database translator logs (the database was processing data and it outputs a log).

I rebooted the machine and cron started running again, but I can't get the oracle service to start again. Normally it runs at startup, but if I need to run it or check it, I use:
Code: /sbin/service oracle restart
Is there another log that I could look at to see what would be the cause of the stoppage? How to get the oracle service started again?

View 6 Replies View Related

Ubuntu :: Custom Upstart Service Failing With "Rejected Send Message"

Feb 8, 2011

I'm trying to write an upstart conf file to get Murmur (the Mumble server) to run as a service. It's located in /etc/murmur, and I'm using the following script in /etc/init/murmur.conf:

[Code]...

View 1 Replies View Related

CentOS 5 Hardware :: Installing CentOS 5.3 Using Custom ISO And Drive Disk?

Nov 10, 2009

I am having new hardware and IDE driver for that hardware as drive disk image (it8213_centos53.img). CentOS 5.3 installation is working fine with drive disk image at USB and CentOS 5.3 at DVD. Our application uses CentOS 5.3 and we build a custom kick-start ISO for installations. Using that ISO client is going to install on all hardware boxes.

Note while installing :
a) No network connection is avalible.
b) No USB isavalible.
c) No floppy is avalible.
d) Only single CD-ROM is avalible.

So, is it possible to build single custom kick-start CentOS 5.3 ISO which contains dirve disk image and entire installation will be done using that image. If so please let me know the steps to build it.

View 2 Replies View Related

Server :: Custom CentOS 5 Install With Ks.cfg File And CentOS All In One

Jan 14, 2010

What i want to be able to do is create a custom kickstart for my centOS 5 server. I want to create a bootable cd that I can pop in my server and basically walk away for 45 minutes and I come back and its fully installed. All the directions I have read so far tell me that I have to create a seperate ks.cfg and then I need my original centos cd to get it booted. Then the cd will ask for where the ks.cfg file is and I have to type the location. I just want to pop the CD in and type in linux_clean or something and have it perform a custom install based on the information and specification in my ks.cfg. How can I go about doing this?

View 1 Replies View Related

General :: Network Is Running Even If Network Service Is Stopped?

Mar 8, 2010

I just want to know one thing. I had stop the network service in ubuntu, still i can able to ping google.com.what u think might be things to consider. these are the outputs see.

root@jeetendra-desktop:~# /etc/init.d/networking stop
* Deconfiguring network
interfaces... [ OK ]
root@jeetendra-desktop:~# ping google.com

[Code]....

View 4 Replies View Related

CentOS 5 :: Best Way For Custom Partitioning

Mar 19, 2010

What is the best way for custom partitioning. I am completely new to Linux. So i dont know what to do.I have 500 GB of disc space.I also have 3 GB RAM.I mean i don't understand the process so

1: it askes for the partition to install linux /
2: swap partition - what is it and what is it for?
3: there can be some other partitions. Will others be visible? if i create them? how are they called and what are they used for) Mb there is something such newb as me should know about it?) I can format only space used for / and other unused space i can format later when linux installed and I am more used to it. When i know what it is for?

View 9 Replies View Related

CentOS 5 :: How To Install Custom Packages

Apr 10, 2009

I'd like to install a package named "pppoeconf" on my CentOS system. I try with "yum install pppoeconf" but the result is "nothing to do" (see below):
It seems that I have missing repositories and I don't know which repositories are good for CentOS. How to fix my repos?

[trixbox1.localdomain yum.repos.d]# yum install pppoeconf
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
epel 100% |=========================| 2.1 kB 00:00
kbs-CentOS-Misc 100% |=========================| 951 B 00:00
atrpms-testing 100% |=========================| 2.2 kB 00:00
trixbox 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:00
trixboxaddons 100% |=========================| 951 B 00:00
updates 100% |=========================| 951 B 00:00
kbs-CentOS-Extras 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
atrpms-stable 100% |=========================| 2.2 kB 00:00
addons 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 98 kB 00:03 148/148
Reducing RHEL 4 5 - i386 - ATrpms to included packages only
Finished
Reducing RHEL 4 5 - i386 - ATrpms to included packages only
Finished
Parsing package install arguments
Nothing to do
[trixbox1.localdomain yum.repos.d]#

View 1 Replies View Related

CentOS 5 :: How To Install RPM Service

Jan 29, 2011

How to install rpm service? I performed command
# yum remove sqlite
and it removed rpm and yum services, as well as many others. How to reverse changes?

View 17 Replies View Related

CentOS 5 Server :: Building Custom Kernel 2.16.19-128.1.10?

May 27, 2009

I have builded my kernel through wiki manual, BUT, the kernel-headers rpm-package has not been builded. Now i have only two packages: kernel and kernel-devel. Is that ok? (i think, that it is not ok, because when i build the same version of kernel on x86_64 platform, after rpmbuild command i have kernel, kernel-devel and kernel-headers packages) My CentOS version is 5.2; platform i686; kernel, kernel-headers, kernel-devel packages 2.6.18-92.el5.

View 6 Replies View Related

CentOS 5 Server :: Make A Custom Ks.cfg DVD For 5 Install

Jan 15, 2010

I need to make a custom ks.cfg DVD for my centOS 5 install. I figured I would download the 5.4.iso. My question is will packages from previous version of centOS 5.0-5-3 work with my 5.4 centOS image?

View 3 Replies View Related

CentOS 5 :: Install Custom Kernel Rpm Via Kickstart

Mar 3, 2010

I have compiled and created a kernel rpm kernel-2.6.18165.11.1.el5-3.i386.rpm
then created initrd image

I have installed the above via kickstart installation

%post
mount xxx.xxx.x.xx:/var/www/html/os/i386 /mnt/tmp
cd /mnt/tmp
rpm -uvh kernel-2.6.18165.11.1.el5-3.i386.rpm
cp initrd-2.6.18-165.11.1.el5.img /boot

[Code]....

View 2 Replies View Related

CentOS 5 :: Simple Custom Localhost YUM Server Using FTP?

Mar 10, 2010

the custom-yum.sh script (or, whatever you say ) below:

#!/bin/bash
## Mounting CD/DVD ##
echo "Mounting CD/DVD in /media"
mount /dev/hdc /media

[Code].....

View 13 Replies View Related

CentOS 5 :: Unable To Build Custom Kernel

Mar 18, 2010

I am trying to build a custom kernel but I couldn't. Here are the steps to reproduce it:
1. Set Up an RPM Build Environment as its is explained in [URL]
2. Then follow the instructions in [URL]
3. When I try to install the kernel source rpm I get the following error:

[matias@Centos ~]$ rpm -i [URL
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root . . .
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
error: unpacking of archive failed on file /home/matias/rpmbuild/SOURCES/linux-2.6.18.tar.bz2;4ba24901: cpio: read

View 8 Replies View Related

Server :: How To Start SSL Service In Centos 5.5

Feb 7, 2011

I am in the task of migrating old linux to new linux which centos 5.5. while moving out all apps ,data etc.I need to configure SSL in apache.I have installed mod_ssl with apache 2.2. i went though some docs to configure with certificate that I have . Not sure how to start the service in 2.2. The apache/SSL was configured in my old server which apachectl. SO after importing certificatr , I do ./apachectl startssl to take in effect. In my new server , the http service is /etc/init.d/httpd, not sure how to start SSL service in centos 5.5.

[Code]...

View 2 Replies View Related

CentOS 5 :: Accessing X Server As A Service?

Jun 3, 2010

I have a webservice which runs under Apache Tomcat. The service is started via a script in /etc/init.d. During the course of the Web service processing, the software must make use of the two NVIDIA GPUs on the computer to do some graphics processing. When this system is booted but not logged in, the web service is accessible but the software cannot access the software cannot access the X server to do it's processing. However, when I am logged in, the user can access the X servers and run correctly. I have tried various solutions but I always have to be logged in to run the software. I seem to have permissions problems but I'm unsure how to resolve them

Is there any way to grant permissions to root (the tomcat service is started as root) to allow it to run the software without logging in?

I am running CentOS 5.4 with Gnome display manager.

View 4 Replies View Related

CentOS 5 :: Stop The X Server Service ?

Aug 9, 2010

I been trying to install the Nvidia driver for my recently installed centos desktop but I could not find the services that I can stop. I have a gnome. did try gdm, xdgm etc etc but no luck how do I stop the x server service ? so that I can install the driver.

View 3 Replies View Related

General :: CentOS 5 - Custom Hard Disk Partition?

Mar 3, 2011

I want to install Cent OS5 on my machine. The Hard Disk is SATA. I want to discuss about how to custom partition the hard disk. In the old version there is a drop down list for manual partition the hard disk. like /,boot,swap,var etc etc. In the new version of centos 5 I can not see things like that. During installation process and in partition page there are things like:

Code:
Remove all partitions on selected drives and create default layout.
Remove Linux partitions on selected drives and create default layout.
Use free space on selected drives and create default layout.
Create custom layout.

When I choose custom layout it show me an error message. "An error has occurred-no invalid devices were found on which to create new files system. Please check your hardware for the cause of this problem."

View 1 Replies View Related

CentOS 5 :: Create Custom X86_64 .iso With I386 Files?

Jan 2, 2011

I have a PXE/kickstart installation system running ok. I would like to build a custom installation x86_64 .iso with the i386 .rpms removed. Currently I install from the standard x86_64 iso, then go and remove the i386 rpm's with all the attendant problems and impact on docs etc. Has anybody tried this? Is it as simple as just deleting *i386.rpm and then building another .iso from the resultant installation tree?

View 9 Replies View Related

CentOS 5 :: LDAP Custom Attributes For User Accounts?

May 13, 2011

I'm trying to setup a custom attribute for user accounts, I'm able to make the attribute (foo) and the Object class (foo_class) . But i'm unable to add foo or foo_class to my test users

View 1 Replies View Related

CentOS 5 :: Can't Install Any Rpms From Custom Appliance Build

Jun 15, 2011

We have an appliance with image being installed from CD/DVD installation
This appliance image is based on CentOS 4.7 kernel/installer/etc. Everything works fine, we ship this product for about 2 years. Recently I had to move it (port everything) to CentOS 5.5 Everything went fine and it works fine except one minor thing )) We can't install it from CD/DVD image yet. Actually it start fine, finds kickstart file, creates partitions correctly, copies install image to harddrive, but fails the next step when it tries to install RPM's

The message we get:

Quote:
the file termcap-5.5-1.20060701.1.noarch.rpm cannot be opened. This is due to a missing file, a corrupt package or corrupt media. Please verify your installation source. If you exit your system will be left in an inconsistent state that will likely require re-installation"

View 2 Replies View Related

General :: Create A Service Using Chkconfig In CentOS?

May 16, 2011

I want to be able to create a service so that the bash script will run every time the server boots up.

I am running CentOS 5.

I have been reading about chkconfig and creating a file in /etc/init.d for chkconfig to handle but I cannot seem to get it to work whenever I 'chkconfig servicename on' and then 'service servicename start'

When I do chkconfig --list my service is listed there.

Can someone provide me with a sample of the file I need to create in /etc/init.d and how to get everything running?

View 2 Replies View Related

Networking :: DHCPD Service Keeps Failing In CentOS 5.4

Jan 21, 2010

I'm having some trouble with getting my DHCP service up and running on my server. Below is my /etc/dhcpd.conf file, which I believe is the right file necessary to get this service up and running correctly. When I do service dhcpd restart it just show in red letter [Failed] next to it.

Code:
ddns-update-style interim;
ignore client-updates;
subnet 10.2.3.1 netmask 255.0.0.0 {
# --- default gateway
#option routers 10.2.1.1;
#option subnet-mask255.0.0.0;

#option nis-domain"domain.org";
#option domain-name"domain.org";
#option domain-name-servers10.7.8.1;

option time-offset-18000;# Eastern Standard Time
#option ntp-servers192.168.1.1;
#option netbios-name-servers192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#option netbios-node-type 2;

range dynamic-bootp 10.2.3.2 10.2.3.254;
default-lease-time 21600;
max-lease-time 43200;

# we want the nameserver to appear at a fixed address
#host ns {
#next-server marvin.redhat.com;
#hardware ethernet 12:34:56:78:AB:CD;
#fixed-address 207.175.42.254; } }

View 2 Replies View Related

General :: Conf File Of A Service In CentOS

Aug 2, 2011

I have just installed sendmailanalyzer to my centos 6 by using rpm package. But before, i tried to install it by perl.There is no problem now everything works but when i want to configure i see that there are lots of conf file. How can i see a conf file of service "sendmailanalyzer" what is the command ?

View 2 Replies View Related

Server :: 389 Directory Service Setup On CentOS 5.5

Feb 1, 2011

I am trying to accomplish an objective, I need to get 389 Directory server installed in the process however is it possible to just have email addresses of users in the LDAP server? I have a primary domain, example 'abcefg.com' with about 3,000 users and several hosted domains like 'xyz.com' and 'mno.com'. The end goal is to speed up email processing, so instead of the Barracuda asking the email server(s) if a user exist it queries the LDAP.

Is there a way to configure 389 Directory Server to contain just the email addresses of the end users to allow the Barracuda to poll the LDAP server to verify the email address is valid. The rest of the authentication like password is handled by the email server. So in the end the LDAP server would just contain the email addresses (live) and the Barracuda would query the LDAP asking if joebob@abcefg.com exist if it does carry on. If user xxeedd@abcefg.com does not exist drop it and go on.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved