Initial Awawawa
This commit is contained in:
11
init/openrc/patchbay-sshd
Executable file
11
init/openrc/patchbay-sshd
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/sbin/openrc-run
|
||||
description="PatchBay dedicated sshd (target only)"
|
||||
supervisor=supervise-daemon
|
||||
command=/usr/local/lib/patchbay/patchbay-sshd
|
||||
command_args="/etc/patchbay/patchbay.conf"
|
||||
output_log=/var/log/patchbay-sshd.log
|
||||
error_log=/var/log/patchbay-sshd.log
|
||||
|
||||
depend() {
|
||||
need net patchbayd
|
||||
}
|
||||
12
init/openrc/patchbay-web
Executable file
12
init/openrc/patchbay-web
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/sbin/openrc-run
|
||||
description="PatchBay web interface (target only)"
|
||||
supervisor=supervise-daemon
|
||||
command=/usr/bin/python3
|
||||
command_args="-m patchbay_web -c /etc/patchbay/patchbay.conf serve"
|
||||
directory=/usr/local/lib/patchbay/web
|
||||
output_log=/var/log/patchbay-web.log
|
||||
error_log=/var/log/patchbay-web.log
|
||||
|
||||
depend() {
|
||||
need net patchbayd
|
||||
}
|
||||
20
init/openrc/patchbayd
Executable file
20
init/openrc/patchbayd
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/sbin/openrc-run
|
||||
description="PatchBay daemon (target hub or client)"
|
||||
supervisor=supervise-daemon
|
||||
command=/usr/local/sbin/patchbayd
|
||||
command_args="-c /etc/patchbay/patchbay.conf"
|
||||
output_log=/var/log/patchbayd.log
|
||||
error_log=/var/log/patchbayd.log
|
||||
extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -m 0755 /run/patchbay
|
||||
}
|
||||
|
||||
reload() {
|
||||
supervise-daemon "$RC_SVCNAME" --signal HUP
|
||||
}
|
||||
4
init/runit/patchbay-sshd/run
Executable file
4
init/runit/patchbay-sshd/run
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
exec 2>&1
|
||||
sv check patchbayd >/dev/null || exit 1
|
||||
exec /usr/local/lib/patchbay/patchbay-sshd /etc/patchbay/patchbay.conf
|
||||
5
init/runit/patchbay-web/run
Executable file
5
init/runit/patchbay-web/run
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
exec 2>&1
|
||||
sv check patchbayd >/dev/null || exit 1
|
||||
cd /usr/local/lib/patchbay/web || exit 1
|
||||
exec python3 -m patchbay_web -c /etc/patchbay/patchbay.conf serve
|
||||
4
init/runit/patchbayd/run
Executable file
4
init/runit/patchbayd/run
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
exec 2>&1
|
||||
mkdir -p /run/patchbay
|
||||
exec /usr/local/sbin/patchbayd -c /etc/patchbay/patchbay.conf
|
||||
14
init/systemd/patchbay-sshd.service
Normal file
14
init/systemd/patchbay-sshd.service
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=PatchBay dedicated sshd (target only)
|
||||
After=network-online.target patchbayd.service
|
||||
Wants=patchbayd.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/lib/patchbay/patchbay-sshd /etc/patchbay/patchbay.conf
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
RuntimeDirectory=patchbay
|
||||
RuntimeDirectoryPreserve=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
13
init/systemd/patchbay-web.service
Normal file
13
init/systemd/patchbay-web.service
Normal file
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=PatchBay web interface (target only)
|
||||
After=network-online.target patchbayd.service
|
||||
Wants=patchbayd.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/usr/local/lib/patchbay/web
|
||||
ExecStart=/usr/bin/python3 -m patchbay_web -c /etc/patchbay/patchbay.conf serve
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
15
init/systemd/patchbayd.service
Normal file
15
init/systemd/patchbayd.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=PatchBay daemon (target hub or client)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/sbin/patchbayd -c /etc/patchbay/patchbay.conf
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
RuntimeDirectory=patchbay
|
||||
RuntimeDirectoryPreserve=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user