From e36ea0c052038e67f9a54432ca2291f52200ee6a Mon Sep 17 00:00:00 2001 From: lepz0r Date: Sun, 27 Nov 2022 10:06:33 +0700 Subject: [PATCH 1/3] Added s6 init script --- init.d/s6/zapret/down | 2 ++ init.d/s6/zapret/type | 1 + init.d/s6/zapret/up | 2 ++ 3 files changed, 5 insertions(+) create mode 100644 init.d/s6/zapret/down create mode 100644 init.d/s6/zapret/type create mode 100644 init.d/s6/zapret/up diff --git a/init.d/s6/zapret/down b/init.d/s6/zapret/down new file mode 100644 index 0000000..aaab911 --- /dev/null +++ b/init.d/s6/zapret/down @@ -0,0 +1,2 @@ +#!/bin/execlineb -P +exec /opt/zapret/init.d/sysv/zapret stop diff --git a/init.d/s6/zapret/type b/init.d/s6/zapret/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/init.d/s6/zapret/type @@ -0,0 +1 @@ +oneshot diff --git a/init.d/s6/zapret/up b/init.d/s6/zapret/up new file mode 100644 index 0000000..42a1210 --- /dev/null +++ b/init.d/s6/zapret/up @@ -0,0 +1,2 @@ +#!/bin/execlineb -P +exec /opt/zapret/init.d/sysv/zapret start From cf8d16221382fd2f0c734fbbb96286c8b7403827 Mon Sep 17 00:00:00 2001 From: lepz0r Date: Sun, 27 Nov 2022 10:58:31 +0700 Subject: [PATCH 2/3] Added runit service --- init.d/runit/zapret/finish | 2 ++ init.d/runit/zapret/run | 3 +++ 2 files changed, 5 insertions(+) create mode 100755 init.d/runit/zapret/finish create mode 100755 init.d/runit/zapret/run diff --git a/init.d/runit/zapret/finish b/init.d/runit/zapret/finish new file mode 100755 index 0000000..2781ad3 --- /dev/null +++ b/init.d/runit/zapret/finish @@ -0,0 +1,2 @@ +#!/bin/sh +/opt/zapret/init.d/sysv/zapret stop diff --git a/init.d/runit/zapret/run b/init.d/runit/zapret/run new file mode 100755 index 0000000..8e887e4 --- /dev/null +++ b/init.d/runit/zapret/run @@ -0,0 +1,3 @@ +#!/bin/sh +/opt/zapret/init.d/sysv/zapret start +exec chpst -b zapret pause From 47076416fbdf4d3d3d7311b7dd00e688e2d90f67 Mon Sep 17 00:00:00 2001 From: lepz0r Date: Sun, 27 Nov 2022 22:09:41 +0700 Subject: [PATCH 3/3] Better runit script compatibility --- init.d/runit/zapret/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.d/runit/zapret/run b/init.d/runit/zapret/run index 8e887e4..f216e93 100755 --- a/init.d/runit/zapret/run +++ b/init.d/runit/zapret/run @@ -1,3 +1,3 @@ #!/bin/sh /opt/zapret/init.d/sysv/zapret start -exec chpst -b zapret pause +exec chpst -b zapret sleep infinity