Skip to content

Commit

Permalink
update twisp-service to log to serial and to daemonize properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Percslol committed Aug 25, 2024
1 parent f8279af commit 9861ad2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
1 change: 0 additions & 1 deletion server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ app.use((req, res, next) => {
app.use(express.static(__dirname + "/public"));
app.use(express.static(__dirname + "/build"));
app.use("/apps", express.static(__dirname + "/apps"));
app.use("/bin", express.static(__dirname + "/bin"));
app.use(express.static(__dirname + "/aboutproxy/static"));

const server = app.listen(port, () => console.log("Listening on port: ", port));
Expand Down
18 changes: 4 additions & 14 deletions x86_image_wizard/alpine/twisp-service
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,13 @@
description="Anura PTY Daemon"
command="/bin/twisp"
command_args="--pty /dev/hvc0"
pidfile="/var/run/twisp.pid"
command_background="yes"
pidfile="/var/run/twisp.pid"
start_stop_daemon_args="--background --make-pidfile"
output_log="/dev/ttyS0"
error_log="/dev/ttyS0"

depend() {
need localmount
after bootmisc
}

start() {
ebegin "Starting ${description}"
start-stop-daemon --start --pidfile "${pidfile}" --background --exec ${command} -- ${command_args}
eend $?
}

stop() {
ebegin "Stopping ${description}"
start-stop-daemon --stop --pidfile "${pidfile}"
eend $?
}
}

0 comments on commit 9861ad2

Please sign in to comment.