mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 13:11:31 +00:00
nightly: bundle systemd service files and install script
This commit is contained in:
32
resources/install/install.sh
Executable file
32
resources/install/install.sh
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
REAL_SCRIPT="$(realpath "${0}")"
|
||||
cd "$(dirname "${REAL_SCRIPT}")"
|
||||
|
||||
if [ -f "/etc/systemd/system/kratad.service" ]
|
||||
then
|
||||
systemctl disable --now kratad.service
|
||||
fi
|
||||
|
||||
if [ -f "/etc/systemd/system/kratanet.service" ]
|
||||
then
|
||||
systemctl disable --now kratanet.service
|
||||
fi
|
||||
|
||||
cp kratad.service /etc/systemd/system/kratad.service
|
||||
cp kratanet.service /etc/systemd/system/kratanet.service
|
||||
|
||||
cp kratad kratanet kratactl /usr/local/bin
|
||||
|
||||
chmod +x /usr/local/bin/kratad
|
||||
chmod +x /usr/local/bin/kratanet
|
||||
chmod +x /usr/local/bin/kratactl
|
||||
|
||||
mkdir -p /var/lib/krata/default
|
||||
cp kernel /var/lib/krata/default/kernel
|
||||
cp initrd /var/lib/krata/default/initrd
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable kratad.service kratanet.service
|
||||
systemctl restart kratad.service kratanet.service
|
@ -5,7 +5,8 @@ Description=Krata Controller Daemon
|
||||
Restart=on-failure
|
||||
Type=simple
|
||||
WorkingDirectory=/var/lib/krata
|
||||
ExecStart=/usr/bin/kratad
|
||||
ExecStart=/usr/local/bin/kratad -l /var/lib/krata/daemon.socket --unix-listen-unlink
|
||||
Environment=RUST_LOG=info
|
||||
User=root
|
||||
|
||||
[Install]
|
||||
|
@ -5,7 +5,8 @@ Description=Krata Networking Daemon
|
||||
Restart=on-failure
|
||||
Type=simple
|
||||
WorkingDirectory=/var/lib/krata
|
||||
ExecStart=/usr/bin/kratanet
|
||||
ExecStart=/usr/local/bin/kratanet
|
||||
Environment=RUST_LOG=info
|
||||
User=root
|
||||
|
||||
[Install]
|
||||
|
Reference in New Issue
Block a user