27 lines
504 B
Bash
Executable File
27 lines
504 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if ! [ -d /var/run/yggdrasil ]
|
|
then
|
|
install -d -o yggdrasil -g yggdrasil /run/yggdrasil /var/run/yggdrasil
|
|
fi
|
|
|
|
|
|
if ! [ -f /etc/yggdrasil/yggdrasil.conf ]
|
|
then
|
|
mkdir -p /etc/yggdrasil/
|
|
yggdrasil -genconf > /etc/yggdrasil/yggdrasil.conf
|
|
fi
|
|
|
|
|
|
# Show node address
|
|
until yggdrasilctl getself | grep -v "^[[:digit:]]"
|
|
do
|
|
sleep 5
|
|
done &
|
|
|
|
|
|
peers_updater --config /etc/yggdrasil/yggdrasil.conf --update_cfg --number 5
|
|
|
|
gosu yggdrasil /usr/sbin/yggdrasil -useconffile /etc/yggdrasil/yggdrasil.conf
|
|
|