Skip to content

Commit

Permalink
reload services instead of rebooting the ap
Browse files Browse the repository at this point in the history
  • Loading branch information
sarcasticadmin committed Jul 30, 2022
1 parent 5deb893 commit 2d785b3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion openwrt/files/etc/udhcpc.user
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ case "$1" in
if [ ! -z "$hostname" ]; then
uci set 'system.@system[0].hostname'="$hostname"
uci commit
if [ `echo "$HOSTNAME" | tr '[A-Z]' '[a-z]'` != `echo "$hostname" | tr '[A-Z]' '[a-z]'` ]; then reboot; fi
if [ `echo "$HOSTNAME" | tr '[A-Z]' '[a-z]'` != `echo "$hostname" | tr '[A-Z]' '[a-z]'` ]; then
# reload/restart whatever needs the hostname updated
/etc/init.d/system reload
service zabbix_agentd restart
service rsyslog restart
service lldpd restart
fi
fi
if [ ! -z "$opt226" ]; then
/root/bin/config-version.sh -c $(printf %d "0x$opt226")
Expand Down

0 comments on commit 2d785b3

Please sign in to comment.