Files
mistborn/scripts/services/Mistborn-rocketchat.service
T

26 lines
878 B
Desktop File
Raw Normal View History

2020-03-07 19:37:10 +00:00
[Unit]
Description=Mistborn Rocket Chat Service
Requires=Mistborn-base.service
After=Mistborn-base.service
2021-01-01 03:31:48 +00:00
PartOf=Mistborn-base.service
2020-03-07 19:37:10 +00:00
[Service]
Restart=always
User=root
Group=docker
PermissionsStartOnly=true
2020-12-06 00:35:21 +00:00
EnvironmentFile=/opt/mistborn/.env
2020-03-07 19:37:10 +00:00
# Shutdown container (if running) when unit is stopped
ExecStartPre=/usr/local/bin/docker-compose -f /opt/mistborn/extra/rocketchat.yml down
2020-03-10 03:07:36 +00:00
2020-05-09 11:23:05 -04:00
ExecStartPre=/sbin/iptables -w -I DOCKER-USER -i DIFACE -p tcp --dport 3001 -j MISTBORN_LOG_DROP
2020-03-07 19:37:10 +00:00
# Start container when unit is started
ExecStart=/usr/local/bin/docker-compose -f /opt/mistborn/extra/rocketchat.yml up --build
# Stop container when unit is stopped
ExecStop=/usr/local/bin/docker-compose -f /opt/mistborn/extra/rocketchat.yml down
# Post stop
ExecStopPost=-/sbin/iptables -D DOCKER-USER -i DIFACE -p tcp --dport 3001 -j MISTBORN_LOG_DROP
2020-03-07 19:37:10 +00:00
[Install]
WantedBy=multi-user.target