mirror of
https://github.com/weewx/weewx.git
synced 2026-04-17 16:16:56 -04:00
28 lines
638 B
Bash
Executable File
28 lines
638 B
Bash
Executable File
#!/bin/sh
|
|
# prerm script for weewx debian package
|
|
# Copyright 2013 Matthew Wall
|
|
#
|
|
# ways this script might be invoked:
|
|
#
|
|
# prerm remove
|
|
# old-prerm upgrade new-version
|
|
# conflictor's-prerm remove in-favor package new-version
|
|
# deconfigured's-prerm deconfigure in-favour package-being-installed version
|
|
# [removing conflicting-package version]
|
|
# new-prerm failed-upgrade old-version
|
|
|
|
# abort if any command returns error
|
|
set -e
|
|
|
|
case "$1" in
|
|
remove|upgrade)
|
|
# stop the weewx daemon
|
|
invoke-rc.d weewx stop
|
|
|
|
# remove any bytecompiled code
|
|
find /usr/share/weewx -name '*.pyc' -delete
|
|
;;
|
|
esac
|
|
|
|
exit 0
|