mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-07 12:09:00 +08:00
Merge branch 'demo-rustysd' into 'master'
Add rustysd to server demo See merge request redox-os/redox!1658
This commit is contained in:
commit
3ddc06cfd4
@ -12,6 +12,7 @@ filesystem_size = 4096
|
|||||||
# Daemons
|
# Daemons
|
||||||
openssh = {}
|
openssh = {}
|
||||||
nginx = {}
|
nginx = {}
|
||||||
|
rustysd = {}
|
||||||
|
|
||||||
# Backends
|
# Backends
|
||||||
php84 = {}
|
php84 = {}
|
||||||
@ -28,11 +29,84 @@ rsync = {}
|
|||||||
vim = {}
|
vim = {}
|
||||||
sqlite3 = {}
|
sqlite3 = {}
|
||||||
# tmux = {}
|
# tmux = {}
|
||||||
# htop = {}
|
htop = {}
|
||||||
|
|
||||||
# Content
|
# Content
|
||||||
website = {}
|
website = {}
|
||||||
|
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
# Undocumented usage of rsdctl, pointing to notifications dir
|
||||||
|
path = "/usr/lib/init.d/19_rustyd"
|
||||||
|
data = """
|
||||||
|
export RSDCTL_ADDR /var/run/rustysd/control.socket
|
||||||
|
"""
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
path = "/usr/lib/init.d/98_keygen_sh"
|
||||||
|
data = """
|
||||||
|
bash /root/keygen.sh
|
||||||
|
"""
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
path = "/usr/lib/init.d/99_rustysd"
|
||||||
|
data = """
|
||||||
|
rustysd --conf /etc/rustysd
|
||||||
|
"""
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
path = "/etc/rustysd/system/network-online.target"
|
||||||
|
data = """
|
||||||
|
[Unit]
|
||||||
|
Description=The target after networks has online
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
"""
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
path = "/etc/rustysd/system/multi-user.target"
|
||||||
|
data = """
|
||||||
|
[Unit]
|
||||||
|
Description=The target after user administrations has online
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
"""
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
path = "/etc/rustysd/system/nginx.service"
|
||||||
|
data = """
|
||||||
|
[Unit]
|
||||||
|
Description=The nginx HTTP and reverse proxy server
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
ExecStart=/usr/bin/nginx
|
||||||
|
TimeoutStopSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
path = "/etc/rustysd/system/ssh.service"
|
||||||
|
data = """
|
||||||
|
[Unit]
|
||||||
|
Description=OpenBSD Secure Shell server
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
ExecStart=/usr/bin/sshd
|
||||||
|
TimeoutStopSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
"""
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
path = "/home/user/public_html/index.php"
|
path = "/home/user/public_html/index.php"
|
||||||
data = """
|
data = """
|
||||||
@ -169,6 +243,19 @@ shell = "/usr/bin/ion" #TODO: nologin?
|
|||||||
password = ""
|
password = ""
|
||||||
shell = "/usr/bin/ion" #TODO: nologin?
|
shell = "/usr/bin/ion" #TODO: nologin?
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
path = "/root/keygen.sh"
|
||||||
|
data = """
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
|
||||||
|
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
|
||||||
|
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
|
||||||
|
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
|
||||||
|
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ""
|
||||||
|
fi
|
||||||
|
"""
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
path = "/home/user/server.sh"
|
path = "/home/user/server.sh"
|
||||||
data = """
|
data = """
|
||||||
@ -194,6 +281,9 @@ data = """
|
|||||||
# To start the daemon, run
|
# To start the daemon, run
|
||||||
# > sudo bash server.sh
|
# > sudo bash server.sh
|
||||||
#
|
#
|
||||||
|
# A WIP port of rustysd is available, you can try start it manually
|
||||||
|
# > sudo rustysd --conf /etc/rustysd
|
||||||
|
#
|
||||||
# The server will start port 22 (ssh), 80 (static web) and 8080 (php)
|
# The server will start port 22 (ssh), 80 (static web) and 8080 (php)
|
||||||
##############################################################################
|
##############################################################################
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user