5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 14:10:28 +00:00

Merge pull request #245 from neilalexander/deb

Update debian package behavior
This commit is contained in:
Arceliar 2018-12-12 17:39:22 -06:00 committed by GitHub
commit ce98aac504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,8 +52,11 @@ Architecture: $PKGARCH
Replaces: $PKGREPLACES Replaces: $PKGREPLACES
Conflicts: $PKGREPLACES Conflicts: $PKGREPLACES
Maintainer: Neil Alexander <neilalexander@users.noreply.github.com> Maintainer: Neil Alexander <neilalexander@users.noreply.github.com>
Description: Debian yggdrasil package Description: Yggdrasil Network
Binary yggdrasil package for Debian and Ubuntu Yggdrasil is an early-stage implementation of a fully end-to-end encrypted IPv6
network. It is lightweight, self-arranging, supported on multiple platforms and
allows pretty much any IPv6-capable application to communicate securely with
other Yggdrasil nodes.
EOF EOF
cat > /tmp/$PKGNAME/debian/copyright << EOF cat > /tmp/$PKGNAME/debian/copyright << EOF
Please see https://github.com/yggdrasil-network/yggdrasil-go/ Please see https://github.com/yggdrasil-network/yggdrasil-go/
@ -76,13 +79,22 @@ then
echo "Normalising /etc/yggdrasil.conf" echo "Normalising /etc/yggdrasil.conf"
/usr/bin/yggdrasil -useconffile /var/backups/yggdrasil.conf.`date +%Y%m%d` -normaliseconf > /etc/yggdrasil.conf /usr/bin/yggdrasil -useconffile /var/backups/yggdrasil.conf.`date +%Y%m%d` -normaliseconf > /etc/yggdrasil.conf
fi fi
systemctl enable yggdrasil if command -v systemctl >/dev/null; then
systemctl start yggdrasil systemctl daemon-reload >/dev/null || true
if [ -f /etc/systemd/system/multi-user.target.wants/yggdrasil.service ]; then
echo "Starting Yggdrasil"
systemctl start yggdrasil || true
fi
fi
EOF EOF
cat > /tmp/$PKGNAME/debian/prerm << EOF cat > /tmp/$PKGNAME/debian/prerm << EOF
#!/bin/sh #!/bin/sh
systemctl disable yggdrasil if command -v systemctl >/dev/null; then
systemctl stop yggdrasil if systemctl is-active --quiet yggdrasil; then
echo "Stopping Yggdrasil"
systemctl stop yggdrasil || true
fi
fi
EOF EOF
cp yggdrasil /tmp/$PKGNAME/usr/bin/ cp yggdrasil /tmp/$PKGNAME/usr/bin/