diff --git a/debian/postinst b/debian/postinst
index e7e205bf1156137f1b9c1ed7639386be1ad1ea5d..f0c90f2960736acd424fb053f8281df3c35e2c9b 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -28,6 +28,7 @@ add_shell() {
 case "$1" in
     configure)
         add_shell
+	killall fishd || true
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/fish.spec.in b/fish.spec.in
index 28a8d0c366dfd5c130ac2a922a30d33a5867a4d5..b5c299ec3638bd25be2fd640f9728ad89baff3aa 100644
--- a/fish.spec.in
+++ b/fish.spec.in
@@ -43,6 +43,10 @@ rm -rf $RPM_BUILD_ROOT
 if ! grep %{_bindir}/fish %{_sysconfdir}/shells >/dev/null; then
 	echo %{_bindir}/fish >>%{_sysconfdir}/shells
 fi
+# Restart fishd if upgrading
+if [ "$1" -gt 1 ]; then
+	killall fishd
+fi
 
 %postun
 # Remove fish from the list of allowed shells in /etc/shells