mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-27 12:05:23 +00:00
Normalise existing yggdrasil.conf on debian package install/upgrade
This commit is contained in:
parent
34f7b7ca14
commit
8a46253c1f
@ -54,11 +54,17 @@ cat > /tmp/$PKGNAME/debian/docs << EOF
|
|||||||
Please see https://github.com/Arceliar/yggdrasil-go/
|
Please see https://github.com/Arceliar/yggdrasil-go/
|
||||||
EOF
|
EOF
|
||||||
cat > /tmp/$PKGNAME/debian/install << EOF
|
cat > /tmp/$PKGNAME/debian/install << EOF
|
||||||
usr/bin/yggdrasil usr/bin/yggdrasilctl usr/bin
|
usr/bin/yggdrasil usr/bin
|
||||||
|
usr/bin/yggdrasilctl usr/bin
|
||||||
etc/systemd/system/*.service etc/systemd/system
|
etc/systemd/system/*.service etc/systemd/system
|
||||||
EOF
|
EOF
|
||||||
cat > /tmp/$PKGNAME/debian/postinst << EOF
|
cat > /tmp/$PKGNAME/debian/postinst << EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
if [ -f /etc/yggdrasil.conf ];
|
||||||
|
then
|
||||||
|
cp /etc/yggdrasil.conf /etc/yggdrasil.conf.pre-upgrade
|
||||||
|
./yggdrasil -useconffile /etc/yggdrasil.conf.pre-upgrade -normaliseconf > /etc/yggdrasil.conf;
|
||||||
|
fi
|
||||||
systemctl enable yggdrasil
|
systemctl enable yggdrasil
|
||||||
systemctl start yggdrasil
|
systemctl start yggdrasil
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user