1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-06-27 16:35:59 +00:00
conduit/snap/hooks/configure
Christopher James Halse Rogers a1af588246
Initial snapcraft metadata
2020-11-25 15:35:40 +11:00

19 lines
541 B
Bash

#!/bin/sh
base_url="$(snapctl get base-url)"
enabled="$(snapctl get enabled)"
if [ -n ${enabled} -a \( "${enabled}" != "true" -a "${enabled}" != "false" \) ]
then
echo "Invalid 'enabled' setting: ${enabled}. Valid values are 'true' or 'false'"
exit 1
fi
if [ -n ${base_url} -a \( -z "${enabled}" -o "${enabled}" = "false" \) ]
then
echo "All required configuration available."
echo "Conduit can now be enabled by setting 'snap set conduit enabled=true' and restarting the service \
with 'snap restart conduit'"
fi
exit 0