There is no "proper way" BECAUSE Raspbian DOES NOT use Debian networking, although it is still possible to use this if desired.
Raspbian uses dhcpcd
as its default network manager. See How to set up networking/WiFi for detail.
Why do you WANT to "interface up/down" - dhcpcd
automatically manages network interfaces, and does an excellent job?
You can write hooks which are invoked by network events - see man 8 dhcpcd-run-hooks
(There are a number of included hooks e.g. 10-wpa_supplicant
see /lib/dhcpcd/dhcpcd-hooks
PS Using a Pi as a WiFi repeater seems a poor idea, due to the restricted network throughput - a dedicated repeater would be cheaper and perform better.
Incidentally you can still use /etc/network/interfaces
if you configure dhcpcd
to NOT manage an interface (discussed in linked answer).
Stretch
networking is the same as Jessie
.
The earlier Foundation implementation of dhcpcd
(in Jessie
and Wheezy
) omitted the 10-wpa_supplicant
hook, requiring a kludge in /etc/network/interfaces
to support WiFi. (In fact I installed 10-wpa_supplicant
in my Jessie
, rendering /etc/network/interfaces
unnecessary.)
Debian Stretch
introduced predictable network interface names which are incompatible with the kludged /etc/network/interfaces
so the 10-wpa_supplicant
hook was included. (For some incomprehensible reason the Foundation later decided to disable predictable network interface names.)
If you want Stretch
networking to work the same as Jessie
all you have to do is delete 10-wpa_supplicant
and restore the kludged /etc/network/interfaces
. This will, of cause, suffer from the limitations of Jessie
networking.