FreedomBox/actions/hostname-change
Sunil Mohan Adapa 2bd0ef7c61
config: Drop ability to set hostname on systems without systemd
We depend on systemd for many things anyway and this code path is never tested.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:51:04 -04:00

9 lines
159 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: AGPL-3.0-or-later
hostname="$1"
hostnamectl set-hostname --transient --static "$hostname"
service avahi-daemon restart