04-17-2008
Quote:
Originally Posted by
gopidesaboyina
start()
{
su - $USER -c "${INSTALL_PATH}/bin/MyApp -X"
# or
# su - $USER -c "cd ${INSTALL_PATH}/bin/; ./MyApp -X"
return 0
}
Thanks for the solution. The second example works exactly as I need it to.
Have a nice day,
Bianca
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a shell script t1.sh. on my solaris box.
So, what are the steps required to make this script run as a Service, when the system re-starts. (for ex:- at run level 3).
I know that I should use the rc.d folders. But I don't know the exact steps.
Kindly explain,
Thanks in... (3 Replies)
Discussion started by: S.Vishwanath
3 Replies
2. Programming
Hi,
I have installed MySql version 5.0.67 in RedHat LINUX version 5. The installation completed successfully.
When I am trying to start the service an error occured the error shown below
".......Manager of pid-file quit without updating file"
Can anyone help me to fix the problem.... (4 Replies)
Discussion started by: saravanakumar
4 Replies
3. Solaris
Hi guys:
i have a Solaris 10 development server and a Solaris 9 production server. The entire task must be done in the dev. server. When it's done and all the testing is OK, the script or files are transfer to prod. Server.
All right. Now I have to figure out a way to put a script to initiate... (2 Replies)
Discussion started by: bmathiasf
2 Replies
4. AIX
As topic, assume we have a service called "blahservice"
and we can start it by:
startsrc -s blahservice
what is the best practice to run such command when system start?
- directly use mkitab to add it into /etc/inittab
or
- drop startup scripts in /etc/rc.d/rcX.d
I know they... (4 Replies)
Discussion started by: acerlinux
4 Replies
5. Red Hat
Today I have installed VSFTPD but service is failing to start.
We have been using standard FTP successful but need to introduce an FTPS option.
I have run YUM install VSFTPD and everything appeared to load ok.
(If I run rpm - qa | grep vsftpd I get vsftpd-2.0.5-16.el5_4.1 which I... (4 Replies)
Discussion started by: PaulComins
4 Replies
6. Red Hat
I have installed version of ntop 4.0.3 by guide.
But I can't start ntop daemon/service. I didn't find a service file for starting.
During the installation there was no problem only want to RRDTool so I installed that. Now there is no necessary package required.
I didn't find in /etc/init.d/... (9 Replies)
Discussion started by: getrue
9 Replies
7. Ubuntu
Hi Team,
I am using DRBL environment on Ubuntu. When my machine starts some times it's not starting lxdm & nslcd service. Because of that i didn't get graphic mode & also not able to authenticate user as nslcd is also stops. I have to login as root and restart these two services, then i am able... (0 Replies)
Discussion started by: paragnehete
0 Replies
8. Shell Programming and Scripting
Hi ,
I am having this start script to start xvfb under rc3.d but it fails during system startup saying unable to open display. also manually if i try to execute the script , it does not work. But if i execute what ever is there in the script line by line on my SHELL , it starts well.
... (2 Replies)
Discussion started by: chidori
2 Replies
9. Solaris
I need to start a service among the last on a freshly booted system. Via the manifest, I've made it dependent on very milestone on the computer yet the service still comes back with an error that a kstat variable in the kernel does not exist.
I run it right the service process right there... (6 Replies)
Discussion started by: JWH
6 Replies
10. Solaris
Hi,
This is Solaris-10 x86. I am not able to start cron service, configured in FMRI. It is in maintenance and when I clear it, it seems like calling and failing on /etc/init.d/tcs-rtm script. I am not able to figure out, why cron is calling that script, if this failure is because of that. Cron... (5 Replies)
Discussion started by: ron323232
5 Replies
LEARN ABOUT OSX
moose::cookbook::extending::recipe4
Moose::Cookbook::Extending::Recipe4(3) User Contributed Perl Documentation Moose::Cookbook::Extending::Recipe4(3)
NAME
Moose::Cookbook::Extending::Recipe4 - Acting like Moose.pm and providing sugar Moose-style
VERSION
version 2.0205
SYNOPSIS
package MyApp::Mooseish;
use Moose ();
use Moose::Exporter;
Moose::Exporter->setup_import_methods(
with_meta => ['has_table'],
also => 'Moose',
);
sub init_meta {
shift;
return Moose->init_meta( @_, metaclass => 'MyApp::Meta::Class' );
}
sub has_table {
my $meta = shift;
$meta->table(shift);
}
package MyApp::Meta::Class;
use Moose;
extends 'Moose::Meta::Class';
has 'table' => ( is => 'rw' );
DESCRIPTION
This recipe expands on the use of Moose::Exporter we saw in Moose::Cookbook::Extending::Recipe1. Instead of providing our own object base
class, we provide our own metaclass class, and we also export a "has_table" sugar function.
Given the above code, you can now replace all instances of "use Moose" with "use MyApp::Mooseish". Similarly, "no Moose" is now replaced
with "no MyApp::Mooseish".
The "with_meta" parameter specifies a list of functions that should be wrapped before exporting. The wrapper simply ensures that the
importing package name is the first argument to the function, so we can do "my $caller = shift;".
See the Moose::Exporter docs for more details on its API.
USING MyApp::Mooseish
The purpose of all this code is to provide a Moose-like interface. Here's what it would look like in actual use:
package MyApp::User;
use MyApp::Mooseish;
has_table 'User';
has 'username' => ( is => 'ro' );
has 'password' => ( is => 'ro' );
sub login { ... }
no MyApp::Mooseish;
All of the normal Moose sugar ("has()", "with()", etc) is available when you "use MyApp::Mooseish".
CONCLUSION
Providing sugar functions can make your extension look much more Moose-ish. See Fey::ORM for a more extensive example.
AUTHOR
Stevan Little <stevan@iinteractive.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.12.5 2011-09-06 Moose::Cookbook::Extending::Recipe4(3)