Skip to content

Commit

Permalink
[dist] use a dedicated DEBIAN_FAMILY var instead of lsb-release
Browse files Browse the repository at this point in the history
  • Loading branch information
jjacque committed Oct 21, 2023
1 parent c6738d1 commit 3c4b5c9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dist/setup-appliance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ if [ -e /etc/os-release ];then
else
OS="UNKNOWN"
fi

DEBIAN_FAMILY="no"
for d in $OS_ID_LIKE $OS_ID;do
case $d in
ubuntu|debian) defaultsfile="/etc/default/obs-server" ;;
ubuntu|debian)
defaultsfile="/etc/default/obs-server"
DEBIAN_FAMILY="yes"
;;
*) defaultsfile="/etc/sysconfig/obs-server" ;;
esac
done
Expand Down Expand Up @@ -172,7 +175,7 @@ if [[ $DETECTED_CERT_CHANGE && ! $SETUP_ONLY ]];then
systemctl reload $HTTPD_SERVICE.service
fi

if [[ "$OS_NAME" =~ ^(Debian|Ubuntu)$ ]]; then
if [[ "$OS_NAME" == "yes" ]]; then
check_unit obs-api.target
else
check_unit obs-api-support.target
Expand Down

0 comments on commit 3c4b5c9

Please sign in to comment.