summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/myth_settings_wrapper.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-10-14 19:42:57 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-10-14 19:42:57 (GMT)
commite4840158643b9d3dd848fce7587d788870813438 (patch)
tree8634c05d907f8558bb0b7fc7d50ae0ae9fb4049e /abs/core/LinHES-config/myth_settings_wrapper.sh
parent489742a5f2ec36803e4272d25ba381e21ede5f2d (diff)
downloadlinhes_pkgbuild-e4840158643b9d3dd848fce7587d788870813438.zip
linhes_pkgbuild-e4840158643b9d3dd848fce7587d788870813438.tar.gz
linhes_pkgbuild-e4840158643b9d3dd848fce7587d788870813438.tar.bz2
LinHES-config: added some logic to account for when the hostname changes via the service menu.
- restart func (this will work itself out if left alone) - restart xymon - run mythutils to change hostname - reload systemsettings with new hostname
Diffstat (limited to 'abs/core/LinHES-config/myth_settings_wrapper.sh')
-rw-r--r--abs/core/LinHES-config/myth_settings_wrapper.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/abs/core/LinHES-config/myth_settings_wrapper.sh b/abs/core/LinHES-config/myth_settings_wrapper.sh
index 6ceec7f..a1fbffc 100644
--- a/abs/core/LinHES-config/myth_settings_wrapper.sh
+++ b/abs/core/LinHES-config/myth_settings_wrapper.sh
@@ -9,7 +9,7 @@ TEMPLATES="$TEMPLATES/settings"
TABLES="settings keybindings jumppoints"
MYTHDBUSER=mythtv
MYTHTVPASSWD=mythtv
-declare -r OPTSTRING="c:e:t:d:h:s:a:z:Ho"
+declare -r OPTSTRING="c:e:t:d:h:s:a:z:Ho:n:j:"
Thistemplate=""
declare -i OVERRIDE=0
declare -i EVERYTHING=0
@@ -152,6 +152,13 @@ do
ARG_ERR
ZIPCODE=$OPTARG
;;
+ n) echo "$SWITCH" "$OPTARG"
+ newhostname=$OPTARG
+ ;;
+
+ j) echo "$SWITCH" "$OPTARG"
+ oldhostname=$OPTARG
+ ;;
o) OVERRIDE=1
;;
@@ -268,7 +275,8 @@ case $OPERATION in
#used when the hostname is changed.
#
#call myth_util $oldhostname $hostname
-
+ mythutil --change-hostname --new-host $newhostname --old-host $oldhostname
+ mythutil --import-settings --infile $TEMPLATES/$Thistemplate/syssettings.xml --hostname $newhostname
;;
USERJOBALLOW)
echo "UserJOBALLOW callremoved"