The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

I'm using ASA 12 + Apache 2.4.12 + PHP 5.6.10 on Fedora 4.0.6 and the stack is running well. When restarting apache I need to manually source from command line like this:

/usr/sbin/httpd -k stop
source /opt/sqlanywhere12/bin64/
/usr/sbin/httpd -k start

My question is how to ensure that 'source /opt/sqlanywhere12/bin64/' automatically executes before httpd starts? This is especially required when system boots.

Fedora 4.0.6 uses systemd, systemctl as service manager. On older systems I was able to insert the source command in the /etc/rc.d/init.d/httpd start() routine. This is not possible anymore.

asked 07 Jul '15, 17:12

Marko's gravatar image

accept rate: 0%

Adding ExecStartPre=/bin/bash -a -c 'source /opt/sqlanywhere12/bin64/' to the .service file should cause the script to be run before Apache starts. I believe (but have not tested) that the -a bash set option should force the environment variables to carry over to the Apache environment.

Alternatively, you could set the appropriate environment variables (LD_LIBRARY_PATH, SQLANY12, etc.) using the Environment= field.

permanent link

answered 08 Jul '15, 08:53

Mikel%20Rychliski's gravatar image

Mikel Rychliski
accept rate: 30%

Solved with Environment= field. Thanks!

(08 Jul '15, 13:28) Marko
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 07 Jul '15, 17:12

question was seen: 300 times

last updated: 08 Jul '15, 13:28