-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
17 changed files
with
691 additions
and
494 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM alpine:3.19.1 | ||
|
||
ADD alpine-openrc.sh /etc/init.d/agent | ||
|
||
RUN apk add --no-cache openrc | ||
RUN apk add --no-cache util-linux | ||
|
||
RUN ln -s agetty /etc/init.d/agetty.ttyS0 | ||
RUN echo ttyS0 > /etc/securetty | ||
RUN rc-update add agetty.ttyS0 default | ||
|
||
RUN echo "root:root" | chpasswd | ||
|
||
RUN addgroup -g 1000 -S nex | ||
RUN adduser -u 1000 -S nex -G nex | ||
|
||
RUN rc-update add devfs boot | ||
RUN rc-update add procfs boot | ||
RUN rc-update add sysfs boot | ||
|
||
RUN rc-update add agent boot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[Unit] | ||
Description=Nex Agent | ||
After=network.target | ||
|
||
[Service] | ||
User=nex | ||
Group=nex | ||
ExecStart=/usr/local/bin/agent | ||
KillSignal=SIGINT | ||
StandardOutput=file:/home/user/nex.log | ||
StandardError=file:/home/user/err.log | ||
Type=simple | ||
Restart=always | ||
|
||
|
||
[Install] | ||
WantedBy=default.target | ||
RequiredBy=network.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/sbin/openrc-run | ||
|
||
name=$RC_SVCNAME | ||
description="Nex Agent" | ||
supervisor="supervise-daemon" | ||
command="/usr/local/bin/agent" | ||
pidfile="/run/agent.pid" | ||
command_user="nex:nex" | ||
output_log="/home/nex/nex.log" | ||
error_log="/home/nex/err.log" | ||
|
||
depend() { | ||
after net.eth0 | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.