19 lines
629 B
Bash
19 lines
629 B
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# The legacy image's systemd replacement can supervise units without a real
|
|
# PID-1 systemd. Start them explicitly and keep the container foreground alive.
|
|
systemctl daemon-reload || true
|
|
systemctl start trojan
|
|
systemctl start trojan-web
|
|
systemctl start trojan-acme-challenge
|
|
# systemctl.py does not run calendar timers; use the host renewal units shipped
|
|
# in trojan-stack/scripts rather than enabling an inert container timer.
|
|
systemctl enable trojan trojan-web trojan-acme-challenge || true
|
|
(
|
|
while sleep 300; do
|
|
/usr/local/sbin/rotate-trojan-log || true
|
|
done
|
|
) &
|
|
exec tail -f /dev/null
|