Browse Source

[weewx] Bump to 4.6.2

Colin Powell 3 years ago
parent
commit
dcc814406e
2 changed files with 15 additions and 16 deletions
  1. 8 9
      ansible/roles/weewx/files/weewx.rc
  2. 7 7
      ansible/roles/weewx/tasks/main.yml

+ 8 - 9
ansible/roles/weewx/files/weewx.rc

@@ -3,11 +3,10 @@
 # Put this script in /usr/local/etc/rc.d then adjust WEEWX_BIN and
 # Put this script in /usr/local/etc/rc.d then adjust WEEWX_BIN and
 # WEEWX_CFG values in /etc/defaults/weewx
 # WEEWX_CFG values in /etc/defaults/weewx
 
 
-WEEWX_BIN="/usr/local/bin/python3.8 /usr/local/src/weewx/weewx-4.5.1/bin/weewxd"
+WEEWX_BIN="/usr/local/bin/python3.8 /usr/local/src/weewx/weewx-4.6.2/bin/weewxd"
 WEEWX_CFG="/usr/local/etc/weewx.conf"
 WEEWX_CFG="/usr/local/etc/weewx.conf"
 WEEWX_PID="/var/run/weewx.pid"
 WEEWX_PID="/var/run/weewx.pid"
 
 
-
 # Read configuration variable file if it is present
 # Read configuration variable file if it is present
 [ -r /etc/defaults/weewx ] && . /etc/defaults/weewx
 [ -r /etc/defaults/weewx ] && . /etc/defaults/weewx
 
 
@@ -15,30 +14,30 @@ case "$1" in
   "start")
   "start")
     echo "Starting weewx..."
     echo "Starting weewx..."
     ${WEEWX_BIN} --config ${WEEWX_CFG} --daemon &
     ${WEEWX_BIN} --config ${WEEWX_CFG} --daemon &
-    echo $! > ${WEEWX_PID}
+    echo $! >${WEEWX_PID}
     echo "done"
     echo "done"
-  ;;
+    ;;
 
 
   "stop")
   "stop")
     echo "Stopping weewx..."
     echo "Stopping weewx..."
-    if [ -f ${WEEWX_PID} ] ; then
-      kill `cat ${WEEWX_PID}`
+    if [ -f ${WEEWX_PID} ]; then
+      kill $(cat ${WEEWX_PID})
       rm ${WEEWX_PID}
       rm ${WEEWX_PID}
       echo "done"
       echo "done"
     else
     else
       echo "not running?"
       echo "not running?"
     fi
     fi
-  ;;
+    ;;
 
 
   "restart")
   "restart")
     echo "Restarting weewx..."
     echo "Restarting weewx..."
     $0 stop
     $0 stop
     sleep 2
     sleep 2
     $0 start
     $0 start
-  ;;
+    ;;
 
 
   *)
   *)
     echo "$0 [start|stop|restart]"
     echo "$0 [start|stop|restart]"
-  ;;
+    ;;
 
 
 esac
 esac

+ 7 - 7
ansible/roles/weewx/tasks/main.yml

@@ -30,7 +30,7 @@
 
 
 - name: WeeWX source unpacked
 - name: WeeWX source unpacked
   unarchive:
   unarchive:
-    src: https://weewx.com/downloads/weewx-4.5.1.tar.gz
+    src: https://weewx.com/downloads/weewx-4.6.2.tar.gz
     dest: /usr/local/src/weewx
     dest: /usr/local/src/weewx
     remote_src: yes
     remote_src: yes
 
 
@@ -41,17 +41,17 @@
 
 
 - name: WeeWX GW1000 driver installed
 - name: WeeWX GW1000 driver installed
   shell:
   shell:
-    chdir: /usr/local/src/weewx/weewx-4.5.1/bin
+    chdir: /usr/local/src/weewx/weewx-4.6.2/bin
     cmd: python3.8 wee_extension --install=/usr/local/src/weewx/gw1000-0.2.0.tar.gz
     cmd: python3.8 wee_extension --install=/usr/local/src/weewx/gw1000-0.2.0.tar.gz
 
 
 - name: WeeWX built
 - name: WeeWX built
   shell: python3.8 ./setup.py build
   shell: python3.8 ./setup.py build
   args:
   args:
-    chdir: /usr/local/src/weewx/weewx-4.5.1
+    chdir: /usr/local/src/weewx/weewx-4.6.2
 
 
 - name: WeeWX skin files copied
 - name: WeeWX skin files copied
   ansible.builtin.copy:
   ansible.builtin.copy:
-    src: /usr/local/src/weewx/weewx-4.5.1/skins
+    src: /usr/local/src/weewx/weewx-4.6.2/skins
     dest: /var/weewx/
     dest: /var/weewx/
     remote_src: yes
     remote_src: yes
 
 
@@ -66,7 +66,7 @@
 - name: WeeWX historygenerator installed
 - name: WeeWX historygenerator installed
   ansible.builtin.copy:
   ansible.builtin.copy:
     src: historygenerator.py
     src: historygenerator.py
-    dest: /usr/local/src/weewx/weewx-4.5.1/bin/user/
+    dest: /usr/local/src/weewx/weewx-4.6.2/bin/user/
 
 
 - name: WeeWX rc file installed
 - name: WeeWX rc file installed
   ansible.builtin.copy:
   ansible.builtin.copy:
@@ -78,7 +78,7 @@
 
 
 - name: WeeWX skin files copied
 - name: WeeWX skin files copied
   ansible.builtin.copy:
   ansible.builtin.copy:
-    src: /usr/local/src/weewx/weewx-4.5.1/skins
+    src: /usr/local/src/weewx/weewx-4.6.2/skins
     dest: /var/weewx/
     dest: /var/weewx/
     remote_src: yes
     remote_src: yes
 
 
@@ -96,7 +96,7 @@
 
 
 - name: WeeWX first report generated
 - name: WeeWX first report generated
   shell:
   shell:
-    chdir: /usr/local/src/weewx/weewx-4.5.1/bin
+    chdir: /usr/local/src/weewx/weewx-4.6.2/bin
     cmd: python3.8 wee_reports
     cmd: python3.8 wee_reports
 
 
 - name: WeeWX started
 - name: WeeWX started