summaryrefslogtreecommitdiff
path: root/src/init
diff options
context:
space:
mode:
Diffstat (limited to 'src/init')
-rwxr-xr-xsrc/init/vyconfd.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/init/vyconfd.sh b/src/init/vyconfd.sh
new file mode 100755
index 000000000..670651f57
--- /dev/null
+++ b/src/init/vyconfd.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Check if state file exists to determine if restart
+if [ -f /var/run/vyconfd.state ]; then
+ echo "Restarting vyconfd from active config"
+ /usr/libexec/vyos/vyconf/vyconfd --log-file /var/run/log/vyconfd.log --reload-active-config --legacy-config-path
+else
+ echo "Starting vyconfd from saved config"
+ touch /var/run/vyconfd.state
+ /usr/libexec/vyos/vyconf/vyconfd --log-file /var/run/log/vyconfd.log --legacy-config-path
+fi