mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Test removal of package
This commit is contained in:
@@ -7,20 +7,36 @@ sudo apt-get install -y -q postgresql \
|
||||
sudo systemctl start postgresql
|
||||
sudo dpkg -i *.deb
|
||||
|
||||
echo "Enabling service..."
|
||||
echo "Enabling service"
|
||||
sudo systemctl start firezone
|
||||
|
||||
# Wait for app to start
|
||||
# XXX: Remove sleeps
|
||||
sleep 10
|
||||
|
||||
echo "Service status..."
|
||||
echo "Service status"
|
||||
sudo systemctl status firezone.service
|
||||
|
||||
echo "Printing service logs..."
|
||||
echo "Printing service logs"
|
||||
sudo journalctl -u firezone.service
|
||||
|
||||
echo "Trying to load homepage..."
|
||||
echo "Trying to load homepage"
|
||||
curl -i -vvv -k https://$(hostname):8800/
|
||||
|
||||
echo "Printing SSL debug info"
|
||||
openssl s_client -connect $(hostname):8800 -servername $(hostname) -showcerts -prexit
|
||||
|
||||
echo "Removing package"
|
||||
sudo apt-get remove firezone
|
||||
|
||||
echo "Checking if directory was removed"
|
||||
if [ -d /opt/firezone ]; then
|
||||
echo "Package removal issue"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Checking if database was dropped"
|
||||
if $(sudo su postgres -c "psql -lqt | cut -d \| -f 1 | grep -qw firezone"); then
|
||||
echo "Database still exists"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -62,8 +62,10 @@ secret_key_base="$(openssl rand -base64 48)"
|
||||
db_key="$(openssl rand -base64 32)"
|
||||
wg_server_key="$(wg genkey)"
|
||||
|
||||
# Write FireZone config files
|
||||
if [ ! -f /opt/firezone/config.env ]; then
|
||||
# Write FireZone config file
|
||||
if [ -f /opt/firezone/config.env ]; then
|
||||
echo "config file exists; not creating"
|
||||
else
|
||||
cat <<EOT >> /opt/firezone/config.env
|
||||
# This file is loaded into FireZone's Environment upon launch to configure it.
|
||||
|
||||
@@ -117,8 +119,6 @@ SSL_KEY_FILE=/opt/firezone/ssl/key.pem
|
||||
# users via the CLI.
|
||||
DISABLE_SIGNUP=yes
|
||||
EOT
|
||||
else
|
||||
echo "config file exists; not creating"
|
||||
fi
|
||||
|
||||
# Set perms
|
||||
|
||||
@@ -11,6 +11,7 @@ AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_DAC_READ_SEARCH
|
||||
EnvironmentFile=/opt/firezone/config.env
|
||||
ExecStartPre=/opt/firezone/bin/firezone eval "FzHttp.Release.migrate"
|
||||
ExecStart=/opt/firezone/bin/firezone start
|
||||
# XXX: Remove sleeps
|
||||
ExecStartPost=/bin/sleep 8
|
||||
ExecStartPost=/opt/firezone/bin/firezone rpc "FzHttp.Release.create_admin_user"
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_DAC_READ_SEARCH
|
||||
EnvironmentFile=/opt/firezone/config.env
|
||||
ExecStartPre=/opt/firezone/bin/firezone eval "FzHttp.Release.migrate"
|
||||
ExecStart=/opt/firezone/bin/firezone start
|
||||
# XXX: Remove sleeps
|
||||
ExecStartPost=/bin/sleep 8
|
||||
ExecStartPost=/opt/firezone/bin/firezone rpc "FzHttp.Release.create_admin_user"
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_DAC_READ_SEARCH
|
||||
EnvironmentFile=/opt/firezone/config.env
|
||||
ExecStartPre=/opt/firezone/bin/firezone eval "FzHttp.Release.migrate"
|
||||
ExecStart=/opt/firezone/bin/firezone start
|
||||
# XXX: Remove sleeps
|
||||
ExecStartPost=/bin/sleep 8
|
||||
ExecStartPost=/opt/firezone/bin/firezone rpc "FzHttp.Release.create_admin_user"
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_DAC_READ_SEARCH
|
||||
EnvironmentFile=/opt/firezone/config.env
|
||||
ExecStartPre=/opt/firezone/bin/firezone eval "FzHttp.Release.migrate"
|
||||
ExecStart=/opt/firezone/bin/firezone start
|
||||
# XXX: Remove sleeps
|
||||
ExecStartPost=/bin/sleep 8
|
||||
ExecStartPost=/opt/firezone/bin/firezone rpc "FzHttp.Release.create_admin_user"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user