equal
deleted
inserted
replaced
131 seek($fh, 0, 0); |
131 seek($fh, 0, 0); |
132 print $fh $_; |
132 print $fh $_; |
133 truncate($fh, tell($fh)); |
133 truncate($fh, tell($fh)); |
134 close($fh) or rename("$SSHD_CONF.bak" => $SSHD_CONF); |
134 close($fh) or rename("$SSHD_CONF.bak" => $SSHD_CONF); |
135 |
135 |
136 system("systemctl try-reload-or-restart ssh.service || invoke-rc.d ssh reload"); |
136 system("systemctl try-reload-or-restart ssh.service || systemctl reload-or-try-restart ssh.service || invoke-rc.d ssh reload"); |
137 |
137 |
138 exit 0; |
138 exit 0; |
139 } |
139 } |
140 else { |
140 else { |
141 warn "Can't modify $SSHD_CONF: $!\n"; |
141 warn "Can't modify $SSHD_CONF: $!\n"; |