ThePrez / ServiceCommander-IBMi

Service Commander for IBM i
Apache License 2.0
39 stars 12 forks source link

[Q] Auto setup an app in Service Commander? #227

Open ravisankar-PIO opened 3 months ago

ravisankar-PIO commented 3 months ago

Hi, A) Is it possible to setup an application (let's say Jenkins) to start via SC by passing all the answers to the interactive questions as parameters? E.g.,

scinit java -jar ~/jenkins.war --httpPort=9095 <followed by parameters for interactive questions???>

B) If the above method is not possible, then can I create a YAML file manually (of course with correct format) and place it in the ~/.sc/services/ folder such as ~/.sc/services/jenkins.yml and then issue a sc start jenkins?

In other words, What is the ideal way of automating the SCINIT?

Thank you, Ravi.

chrjorgensen commented 3 months ago

@ravisankar-PIO The scinit tool is an interactive proces and not suited for automation.

Instead you should create/build the YAML file and store it in ~/.sc/services (for user services) or in /QOpenSys/etc/sc/services for common services. Then you can run sc start <service>.

HTH.