user defined service help

Brian Millett bmillett at gmail.com
Wed May 4 20:48:52 UTC 2011


On Wed, 2011-05-04 at 19:51 +0000, "Jóhann B. Guðmundsson" wrote:
> On 05/04/2011 03:50 PM, Brian Millett wrote:
> > [Unit]
> > Description=JBoss AS 7 domain server
> > After=local-fs.target network.target
> >
> > [Service]
> > Type=simple
> > ExecStart=/opt/jboss/bin/domain.sh
> > NonBlocking=yes
> >
> > [Install]
> > WantedBy=multi-user.target
> /usr/lib/systemd/user/jboss7.service <-- ? this path is a bit odd all 

because that was a guess based on the name /usr/lib/systemd/user.  Don't
know what that directory is for.

> custom files should reside in the /etc/systemd/system/ directory 
> regardless of Linux distribution

Good!  What does the /etc/systemd/user directory do?

> Other than that it should work.
> 
> Reload the systemd daemon to let it pick up the changes
> 
> systemctl daemon-reload
> 
> To start the service
> 
> systemctl start jboss7.service
> 
> To stop the service
> 
> systemctl stop jboss7.service
> 
> To see the status of the service
> 
> systemctl status jboss7.service
> 
> To enable the service run
> 
> systemctl enable jboss7.service
> 
> systemd service files default to Type=simple so you could skip that line 
> if you wanted to.
> 
> JBG

Thanks!  Got working just great!  Even read how to have the process run
as a different user/group and it is just slick!

Thanks.
-- 
Brian Millett - [ Delenn, "In the Shadow of Z'Ha'Dum"]
"There are beings in the universe billions of years older than either
 of our races. Once, long ago, they walked among the stars like giants,
 vast and timeless. They taught the younger races, explored beyond the
 rim, created great empires. But to all things there is an end. Slowly,
 over a million years, the First Ones went away. Some passed beyond the 
 stars, never to return. Some simply disappeared." 
        
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.fedoraproject.org/pipermail/test/attachments/20110504/07179447/attachment.bin 


More information about the test mailing list