Skip to content
Snippets Groups Projects
Commit bfd1db49 authored by Gaetan Bisson's avatar Gaetan Bisson
Browse files

remove deprecated rc script

parent c4df08da
No related branches found
No related tags found
No related merge requests found
......@@ -19,20 +19,16 @@ source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}
'sshd@.service'
'sshd.service'
'sshd.socket'
'sshd.confd'
'sshd.pam'
'sshd')
'sshd.pam')
sha1sums=('8824708c617cc781b2bb29fa20bd905fd3d2a43d'
'954bf1660aa32620c37034320877f4511b767ccb'
'6df5be396f8c593bb511a249a1453294d18a01a6'
'bd6eae36c7ef9efb7147778baad7858b81f2d660'
'f9af4a442b804ab661cec0edb25dd76dee16d8d2'
'e12fa910b26a5634e5a6ac39ce1399a132cf6796'
'ec102deb69cad7d14f406289d2fc11fee6eddbdd'
'd93dca5ebda4610ff7647187f8928a3de28703f3'
'1488d4ed33cf3037accf4b0e1c7a7e90b6a097c7')
'd93dca5ebda4610ff7647187f8928a3de28703f3')
backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd' 'etc/conf.d/sshd')
backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
......@@ -79,9 +75,7 @@ package() {
install -Dm644 ../sshd.socket "${pkgdir}"/usr/lib/systemd/system/sshd.socket
install -Dm755 ../sshd.close-sessions "${pkgdir}/etc/rc.d/functions.d/sshd-close-sessions" # FS#17389
install -Dm644 ../sshd.confd "${pkgdir}"/etc/conf.d/sshd
install -Dm644 ../sshd.pam "${pkgdir}"/etc/pam.d/sshd
install -Dm755 ../sshd "${pkgdir}"/etc/rc.d/sshd
install -Dm755 contrib/findssl.sh "${pkgdir}"/usr/bin/findssl.sh
install -Dm755 contrib/ssh-copy-id "${pkgdir}"/usr/bin/ssh-copy-id
......
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/sshd
PIDFILE=/run/sshd.pid
PID=$(cat $PIDFILE 2>/dev/null)
if ! readlink -q /proc/$PID/exe | grep -q '^/usr/sbin/sshd'; then
PID=
rm $PIDFILE 2>/dev/null
fi
case "$1" in
start)
stat_busy 'Starting Secure Shell Daemon'
/usr/bin/ssh-keygen -A
[[ -z $PID ]] && /usr/sbin/sshd $SSHD_ARGS
if [[ $? -gt 0 ]]; then
stat_fail
else
add_daemon sshd
stat_done
fi
;;
stop)
stat_busy 'Stopping Secure Shell Daemon'
[[ ! -z $PID ]] && kill $PID &> /dev/null
if [[ $? -gt 0 ]]; then
stat_fail
else
rm_daemon sshd
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
#
# Parameters to be passed to sshd
#
SSHD_ARGS=""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment