We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a02bdf commit 4788441Copy full SHA for 4788441
1 file changed
files/etc/init.d/autocfg
@@ -0,0 +1,31 @@
1
+#!/bin/sh /etc/rc.common
2
+
3
+START=80
4
+NAME=autocfg
5
+EXTRA_COMMANDS="reset"
6
+EXTRA_HELP="reset Removes all config files on the usb stick and recreates them"
7
8
+work_folder=/opt/autocfg
9
10
+start() {
11
12
+ $work_folder/bin/auto_config.sh >> /mnt/usb/apply_config.log
13
+ local change_rc=$?
14
15
+ if [ "$change_rc" == "0"] ; then
16
+ echo "Changes by auto-config" >> /mnt/usb/apply_config.log
17
+ echo "Initiates reboot" >> /mnt/usb/apply_config.log
18
+ reboot
19
+ fi
20
21
+}
22
23
+reset () {
24
+ . $work_folder/conf/auto.config.sh
25
+ rm $cfg_auto_folder/*
26
27
+ $work_folder/bin/auto_config.sh
28
29
30
+stop() {
31
0 commit comments