Skip to content

Commit ad60030

Browse files
authored
Merge pull request #4827 from jestabro/vyconfd-restart
T7980: Load active config on vyconfd restart
2 parents 78af000 + 018b6fd commit ad60030

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/init/vyconfd.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
#
3+
# Check if state file exists to determine if restart
4+
if [ -f /var/run/vyconfd.state ]; then
5+
echo "Restarting vyconfd from active config"
6+
/usr/libexec/vyos/vyconf/vyconfd --log-file /var/run/log/vyconfd.log --reload-active-config --legacy-config-path
7+
else
8+
echo "Starting vyconfd from saved config"
9+
touch /var/run/vyconfd.state
10+
/usr/libexec/vyos/vyconf/vyconfd --log-file /var/run/log/vyconfd.log --legacy-config-path
11+
fi

src/init/vyos-router

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,6 @@ start ()
594594

595595
disabled system_config || system_config || overall_status=1
596596

597-
systemctl start vyconfd.service
598-
599597
for s in ${subinit[@]} ; do
600598
if ! disabled $s; then
601599
log_progress_msg $s

src/systemd/vyconfd.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DefaultDependencies=no
88
After=systemd-remount-fs.service
99

1010
[Service]
11-
ExecStart=/usr/libexec/vyos/vyconf/vyconfd --log-file /var/run/log/vyconfd.log --legacy-config-path
11+
ExecStart=/usr/libexec/vyos/init/vyconfd.sh
1212
Type=exec
1313
SyslogIdentifier=vyconfd
1414
SyslogFacility=daemon

0 commit comments

Comments
 (0)