Skip to content

Commit

Permalink
fix logging; link scripts to /usr/bin
Browse files Browse the repository at this point in the history
  • Loading branch information
flameshikari authored and xtrime-ru committed Aug 19, 2024
1 parent 95c0105 commit eed8e2c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ RUN <<-"EOF" bash -ex
for list in antizapret/config/*-custom.txt; do rm -f $list; done

ln -sf /root/antizapret/doall.sh /usr/bin/doall
ln -sf /root/antizapret/dnsmap.py /usr/bin/dnsmap

rm -frv /tmp/*
EOF
Expand Down
2 changes: 1 addition & 1 deletion rootfs/etc/systemd/system/antizapret-update.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Wants=network-online.target

[Service]
WorkingDirectory=/root/antizapret
ExecStart=/root/antizapret/doall.sh
ExecStart=/usr/bin/doall
EnvironmentFile=/etc/default/antizapret

[Install]
Expand Down
2 changes: 1 addition & 1 deletion rootfs/etc/systemd/system/dnsmap.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Description=dnsmap
After=network.target

[Service]
ExecStart=/root/antizapret/dnsmap.py -a 127.0.0.4 --iprange 10.224.0.0/15
ExecStart=/usr/bin/dnsmap -a 127.0.0.4 --iprange 10.224.0.0/15
EnvironmentFile=/etc/default/antizapret

[Install]
Expand Down
7 changes: 3 additions & 4 deletions rootfs/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function set_ciphers () {
# save DNS variables to /etc/default/antizapret
# in order to systemd services can access them

cat << EOF | tee /etc/default/antizapret
cat << EOF | sponge /etc/default/antizapret
CBC_CIPHERS=${CBC_CIPHERS:-0}
DNS=$(resolve $DNS)
DNS_RU=$(resolve $DNS_RU 77.88.8.8)
Expand All @@ -58,12 +58,11 @@ done


# swap between legacy ciphers and DCO-required ciphers

[[ "$CBC_CIPHERS" == 1 ]] && set_ciphers AES-128-CBC:AES-256-CBC || set_ciphers


# output systemd logs to docker logs
postrun journalctl -f --no-hostname --since "$(date '+%Y-%m-%d %T')"
# output systemd logs to docker logs since container boot
postrun 'journalctl --boot --follow --lines=all --no-hostname'


# systemd init
Expand Down

0 comments on commit eed8e2c

Please sign in to comment.