summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst14
1 files changed, 11 insertions, 3 deletions
diff --git a/debian/postinst b/debian/postinst
index af0f8a21c..f3d4cf6d5 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -289,7 +289,11 @@ fix_conffile_permissions() {
289setup_startup() { 289setup_startup() {
290 db_get ssh/run_sshd 290 db_get ssh/run_sshd
291 if [ "$RET" = "false" ] ; then 291 if [ "$RET" = "false" ] ; then
292 /etc/init.d/ssh stop 2>&1 >/dev/null 292 if [ -x /usr/sbin/invoke-rc.d ]; then
293 invoke-rc.d --quiet ssh stop
294 else
295 /etc/init.d/ssh stop
296 fi
293 touch /etc/ssh/sshd_not_to_be_run 297 touch /etc/ssh/sshd_not_to_be_run
294 else 298 else
295 rm -f /etc/ssh/sshd_not_to_be_run 2>/dev/null 299 rm -f /etc/ssh/sshd_not_to_be_run 2>/dev/null
@@ -298,9 +302,13 @@ setup_startup() {
298 302
299 303
300setup_init() { 304setup_init() {
301 if [ -e /etc/init.d/ssh ]; then 305 if [ -x /etc/init.d/ssh ]; then
302 update-rc.d ssh defaults >/dev/null 306 update-rc.d ssh defaults >/dev/null
303 /etc/init.d/ssh restart 307 if [ -x /usr/sbin/invoke-rc.d ]; then
308 invoke-rc.d ssh restart
309 else
310 /etc/init.d/ssh restart
311 fi
304 fi 312 fi
305} 313}
306 314