Well, I had to go there eventually. So far I've only read the Slashdot
systemd flame wars. :) I think the rc.local thing would work fine, but
using systemd is apparently the way to do it going forward.

Specifically, this is for SLES12. So far, the init scripts seem to be
working on RHEL7 (maybe).

There actually are some instructions in the latest install guide for
Fedora, so I modified those a bit and came up with this:

For SLES12:

1. Create file /etc/systemd/system/startstaf.service (this file location
seem to vary by distro) with the following contents:

[Unit]
Description=Start the STAF service
After=syslog.target
[Service]
EnvironmentFile=/usr/local/staf/STAFEnv.systemd
ExecStart=/usr/local/staf/startSTAFProc.sh
Type=forking
[Install]
WantedBy=multi-user.target graphical.target

2. Create new file /usr/local/staf/STAFEnv.systemd:

# STAF environment variables for systemd startup
PATH=/opt/medusa_labs/test_tools/bin:/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/tst/:/tst/bin:/usr/local/staf/bin
LD_LIBRARY_PATH=/usr/local/staf/lib:${LD_LIBRARY_PATH:-}
CLASSPATH=/usr/local/staf/lib/JSTAF.jar:/usr/local/staf/samples/demo/STAFDemo.jar:${CLASSPATH:-}
STAFCONVDIR=/usr/local/staf/codepage
STAF_INSTANCE_NAME=STAF

( I had to add some system specific PATH entries there. Before it just
inherited root's PATH, but apparently not so with systemd).

3. Run these commands:

systemctl daemon-reload
systemctl start startstaf.service
systemctl enable startstaf.service  (I think this makes it start on boot?)


So far, so good. :)

J. Scott Farrow




On Fri, Feb 13, 2015 at 4:04 PM, Sharon Lucas <luc...@us.ibm.com> wrote:

> What Linux distribution and version are you using?  Perhaps another
> possibility is using "upstart" as documented for RHEL 6 in section "11.
> Starting STAFProc during system reboot", subsection "11.1 Linux",
> sub-subsection "RHEL 6" in the STAF Installation Guide at
> http://staf.sourceforge.net/current/STAFInstall.pdf
>
> I haven't created a systemd startup script for STAF myself but if someone
> has one, please provide it and I can also include it in the STAF
> documentation.
>
> --------------------------------------------------------------
> Sharon Lucas
> IBM Austin,   luc...@us.ibm.com
> (512) 286-7313 or Tieline 363-7313
>
>
>
>
> From:        "J. Scott Farrow" <jscott.far...@gmail.com>
> To:        staf-users@lists.sourceforge.net
> Date:        02/13/2015 04:53 PM
> Subject:        [staf-users] systemd startup script for STAF on Linux?
> ------------------------------
>
>
>
> Before I reinvent the wheel, has anyone created a systemd startup 'script'
> (or whatever) for STAF on Linux? My old init scripts don't seem to be
> working anymore.
>
> Thanks,
>
> J. Scott Farrow
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> staf-users mailing list
> staf-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/staf-users
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to