From bbf5371425f80e0b82eff65f1a570ef3a4e2f5ea Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Mon, 22 Jun 2020 13:06:05 +0200 Subject: #986 More renaming to ogserver Another step into renaming all references of ogAdmServer to ogServer. This commit mostly rename references to ogAdmServer.cfg in scripts. --- installer/opengnsys_update.sh | 2 +- repoman/bin/importimage | 2 +- server/bin/addtodhcp | 2 +- server/bin/checkperms | 4 ++-- server/bin/comparedhcpopengnsys | 2 +- server/bin/comparemac | 2 +- server/bin/listclientlive | 2 +- server/bin/listclientmode | 2 +- server/bin/ogagentqueue.cron | 2 +- server/bin/setclientlive | 2 +- server/bin/setclientmode | 2 +- server/bin/setserveraddr | 6 +++--- server/bin/settoken | 2 +- server/lib/checkrest | 2 +- server/lib/supportsave | 4 ++-- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 904a1184..bb589211 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -1099,7 +1099,7 @@ function ogServerCompilation() $STOPSERVICE echoAndLog "${FUNCNAME}(): updating new service file" backupFile /lib/systemd/system/ogserver.service - service="ogadmserver" + service="ogserver" $STOPSERVICE cp -a \ "$WORKDIR"/ogServer-"$BRANCH"/cfg/ogserver.service \ diff --git a/repoman/bin/importimage b/repoman/bin/importimage index 8fed1196..db652f9d 100755 --- a/repoman/bin/importimage +++ b/repoman/bin/importimage @@ -20,7 +20,7 @@ OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} REPODIR="$OPENGNSYS/images" REPOCONF="$OPENGNSYS/etc/ogAdmRepo.cfg" -SERVERCONF="$OPENGNSYS/etc/ogAdmServer.cfg" +SERVERCONF="$OPENGNSYS/etc/ogserver.cfg" DEFAULTFILE="/etc/default/opengnsys" let BACKUP=0 source $DEFAULTFILE diff --git a/server/bin/addtodhcp b/server/bin/addtodhcp index aef8665c..42fe7f8e 100755 --- a/server/bin/addtodhcp +++ b/server/bin/addtodhcp @@ -15,7 +15,7 @@ # Variables. PROG="$(basename "$0")" OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} -SERVERCONF=$OPENGNSYS/etc/ogAdmServer.cfg +SERVERCONF=$OPENGNSYS/etc/ogserver.cfg DHCPCONF=/etc/dhcp/dhcpd.conf DHCPCONFBCK="$DHCPCONF-$(date +"%Y%m%d")" diff --git a/server/bin/checkperms b/server/bin/checkperms index c03f88bf..613410d1 100755 --- a/server/bin/checkperms +++ b/server/bin/checkperms @@ -48,8 +48,8 @@ chown -R $OPENGNSYS_USER:$OPENGNSYS_USER $OPENGNSYS_DIR/client/etc/ssl/private chmod -R go-rwx $OPENGNSYS_DIR/client/etc/ssl/private chown $OPENGNSYS_USER:$OPENGNSYS_USER $OPENGNSYS_DIR/client/interfaceAdm/CambiarAcceso chmod 700 $OPENGNSYS_DIR/client/interfaceAdm/CambiarAcceso -chown root:$APACHE_GROUP $OPENGNSYS_DIR/{www/controlacceso*.php,etc/ogAdmRepo*.cfg,etc/ogAdmServer*.cfg} -chmod 640 $OPENGNSYS_DIR/{www/controlacceso*.php,etc/ogAdmRepo*.cfg,etc/ogAdmServer*.cfg} +chown root:$APACHE_GROUP $OPENGNSYS_DIR/{www/controlacceso*.php,etc/ogAdmRepo*.cfg,etc/ogserver*.cfg} +chmod 640 $OPENGNSYS_DIR/{www/controlacceso*.php,etc/ogAdmRepo*.cfg,etc/ogserver*.cfg} chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/www/images/{fotos,iconos} mkdir -p $OPENGNSYS_DIR/www/{api,tmp} chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/www/{api,tmp} diff --git a/server/bin/comparedhcpopengnsys b/server/bin/comparedhcpopengnsys index e6fdd3b1..b4743e42 100755 --- a/server/bin/comparedhcpopengnsys +++ b/server/bin/comparedhcpopengnsys @@ -16,7 +16,7 @@ PROG="$(basename "$0")" OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} -SERVERCONF=$OPENGNSYS/etc/ogAdmServer.cfg +SERVERCONF=$OPENGNSYS/etc/ogserver.cfg DHCPFILE=${DHCPFILE:-/etc/dhcp/dhcpd.conf} TMP_DHCP=/tmp/$PROG-dhcp$$ TMP_MYSQL=/tmp/$PROG-mysql$$ diff --git a/server/bin/comparemac b/server/bin/comparemac index 43d0d288..6b1c6eff 100755 --- a/server/bin/comparemac +++ b/server/bin/comparemac @@ -12,7 +12,7 @@ # Variables. OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} -SERVERCONF=$OPENGNSYS/etc/ogAdmServer.cfg +SERVERCONF=$OPENGNSYS/etc/ogserver.cfg # Funciones globales. source $OPENGNSYS/lib/ogfunctions.sh || exit 1 diff --git a/server/bin/listclientlive b/server/bin/listclientlive index 5d06304d..0e7f1c4a 100755 --- a/server/bin/listclientlive +++ b/server/bin/listclientlive @@ -12,7 +12,7 @@ # Variables. OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} -SERVERCONF=$OPENGNSYS/etc/ogAdmServer.cfg +SERVERCONF=$OPENGNSYS/etc/ogserver.cfg TFTPDIR=$OPENGNSYS/tftpboot source $OPENGNSYS/lib/ogfunctions.sh || exit 1 diff --git a/server/bin/listclientmode b/server/bin/listclientmode index 4193c6fc..d4bac228 100755 --- a/server/bin/listclientmode +++ b/server/bin/listclientmode @@ -15,7 +15,7 @@ # Variables. OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} -SERVERCONF=$OPENGNSYS/etc/ogAdmServer.cfg +SERVERCONF=$OPENGNSYS/etc/ogserver.cfg TMPLDIR=$OPENGNSYS/tftpboot/menu.lst/templates source $OPENGNSYS/lib/ogfunctions.sh || exit 1 diff --git a/server/bin/ogagentqueue.cron b/server/bin/ogagentqueue.cron index 9b6d8c5c..16f7c67e 100755 --- a/server/bin/ogagentqueue.cron +++ b/server/bin/ogagentqueue.cron @@ -13,7 +13,7 @@ # Variables. PROG=$(basename "$0") OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} -SERVERCONF=$OPENGNSYS/etc/ogAdmServer.cfg +SERVERCONF=$OPENGNSYS/etc/ogserver.cfg LOGFILE=$OPENGNSYS/log/remotepc.log source $OPENGNSYS/lib/ogfunctions.sh || exit 1 diff --git a/server/bin/setclientlive b/server/bin/setclientlive index 42e55e4b..0424e605 100755 --- a/server/bin/setclientlive +++ b/server/bin/setclientlive @@ -17,7 +17,7 @@ PROG="$(basename "$0")" OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} PATH=$PATH:$OPENGNSYS/bin -SERVERCONF=$OPENGNSYS/etc/ogAdmServer.cfg +SERVERCONF=$OPENGNSYS/etc/ogserver.cfg TFTPDIR=$OPENGNSYS/tftpboot LOGFILE=$OPENGNSYS/log/opengnsys.log diff --git a/server/bin/setclientmode b/server/bin/setclientmode index a0e70c1a..fdb92193 100755 --- a/server/bin/setclientmode +++ b/server/bin/setclientmode @@ -30,7 +30,7 @@ # Variables y funciones globales. PROG="$(basename "$0")" OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} -SERVERCONF=$OPENGNSYS/etc/ogAdmServer.cfg +SERVERCONF=$OPENGNSYS/etc/ogserver.cfg PXEDIR[0]=$OPENGNSYS/tftpboot/menu.lst PXEDIR[1]=$OPENGNSYS/tftpboot/grub LOGFILE=$OPENGNSYS/log/opengnsys.log diff --git a/server/bin/setserveraddr b/server/bin/setserveraddr index 203e095b..b5092ae5 100755 --- a/server/bin/setserveraddr +++ b/server/bin/setserveraddr @@ -33,7 +33,7 @@ source $OPENGNSYS/lib/ogfunctions.sh || exit 1 [ "$USER" != "root" ] && raiseError access "Need to be root" [ $# -ne 1 ] && raiseError usage [ -r $DEFAULTFILE ] || raiseError access "Cannot read default configuration file" -for f in $OPENGNSYS/{etc/{ogAdmServer,ogAdmRepo}.cfg,www/controlacceso.php,client/ogClient/cfg/ogclient.json}; do +for f in $OPENGNSYS/{etc/{ogserver,ogAdmRepo}.cfg,www/controlacceso.php,client/ogClient/cfg/ogclient.json}; do [ -w $f ] || raiseError access "Cannot write to file: $f" done @@ -84,11 +84,11 @@ if [ -n "$SERVERIP" ]; then fi # Saving old IP address. - source $OPENGNSYS/etc/ogAdmServer.cfg + source $OPENGNSYS/etc/ogserver.cfg OLDSERVERIP=$ServidorAdm # Checking if configuration files need to be modified. CHANGE=0 - for f in $OPENGNSYS/{etc/{ogAdmServer,ogAdmRepo}.cfg,www/controlacceso.php}; do + for f in $OPENGNSYS/{etc/{ogserver,ogAdmRepo}.cfg,www/controlacceso.php}; do # Updating configuration variables (if URL does not contain "localhost"). sed -e "s,\(ServidorAdm\|IPlocal\)=.*,\1=$SERVERIP," \ -e "s,^INTERFACE=.*,INTERFACE=$SERVERDEV," \ diff --git a/server/bin/settoken b/server/bin/settoken index 492dc855..159c4c68 100755 --- a/server/bin/settoken +++ b/server/bin/settoken @@ -15,7 +15,7 @@ # Global constants. OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} -SERVERCFG=$OPENGNSYS/etc/ogAdmServer.cfg # Configuration files. +SERVERCFG=$OPENGNSYS/etc/ogserver.cfg # Configuration files. REPOCFG=$OPENGNSYS/etc/ogAdmRepo.cfg # Functions. diff --git a/server/lib/checkrest b/server/lib/checkrest index 3db161f5..3fcd8bd1 100755 --- a/server/lib/checkrest +++ b/server/lib/checkrest @@ -12,7 +12,7 @@ PROG=$(basename "$0") OPENGNSYS=/opt/opengnsys -CONFIGFILE=$OPENGNSYS/etc/ogAdmServer.cfg +CONFIGFILE=$OPENGNSYS/etc/ogserver.cfg RESTURL="https://localhost/opengnsys/rest" source $OPENGNSYS/lib/ogfunctions.sh || exit 1 diff --git a/server/lib/supportsave b/server/lib/supportsave index e5a9fd20..8d5c2dd9 100755 --- a/server/lib/supportsave +++ b/server/lib/supportsave @@ -180,9 +180,9 @@ fi echo "- Directory list" ls -Ral ${home_dir} >> $backup_dir/opengnsys_files.txt 2>&1 -if [ -r ${home_dir}/etc/ogAdmServer.cfg ]; then +if [ -r ${home_dir}/etc/ogserver.cfg ]; then echo "- Database schema" - source ${home_dir}/etc/ogAdmServer.cfg + source ${home_dir}/etc/ogserver.cfg mysqldump -u "$USUARIO" -p"$PASSWORD" -d "$CATALOG" >> ${backup_dir}/opengnsys_schema.sql 2>&1 else echo "- WARNING: The OpenGnsys database can not be accessed" | tee ${backup_dir}/db_schema.txt -- cgit v1.2.3-18-g5258