Start-up logic for Linux systemctl systems

 

Create two services.  The first (apacheds.service) starts up ApacheDS (if you are running it).  The second (bedework.service) starts up jboss (with bedework inside).  It also starts up the webcaching system.

 

Save something like the block of code that follows into /etc/systemd/system/apacheds.service

 

[Unit]
Description=Bedework Calendar ApacheDS
After=network.target
 
[Service]
Environment=JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk
WorkingDirectory=/opt/quickstart-3.10
Type=idle
ExecStart=/opt/quickstart-3.10/bw dirstart
User=bedework
Group=bedework
TimeoutStartSec=0
TimeoutStopSec=180
 
[Install]
WantedBy=multi-user.target

 

Save something like the block of code that follows into / /etc/systemd/system/bedework.service

 

[Unit]
Description=Bedework Calendar
After=apacheds.service


[Service]
Environment=JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk
WorkingDirectory=/opt/quickstart-3.10
Type=idle
ExecStart=/opt/quickstart-3.10/startjboss -heap 2G
ExecStartPost=/opt/quickstart-3.10/runcache
User=bedework
Group=bedework
TimeoutStartSec=0
TimeoutStopSec=180


[Install]
WantedBy=multi-user.target

 

Start up with

 

$ sudo systemctl start apacheds.service

$ sudo systemct start bedework.service



Set up for boot with:


$ sudo systemctl enable apacheds.service

$ sudo systemctl enable bedework.service




Bedework Enterprise Calendar Server, version 3.10