Sametime 12 autostart with Systemd

Categories: hcl

Here’s the systemd script i’m using to get my sametime containers created and running after the parent OS has been rebooted.

Create the docker-samtime.service in /etc/systemd/system/

[Unit]
Description=Docker Sametime Service
Requires=docker.service
After=docker.service

[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/opt/sametime
ExecStart=/usr/local/bin/docker-compose up -d --scale jibri=5
ExecStop=/usr/local/bin/docker-compose down
ExecStopPost=/opt/sametime/CleanUpMultiJibri.sh
ExecReload=/usr/local/bin/docker-compose restart

[Install]
WantedBy=multi-user.target

 
Run systemctl daemon-reload to make systemd aware of the new service

Run systemct enable docker-sametime.service to enable the service in systemd