Browse Source

added

master
Ralph Rönnquist 2 months ago
commit
045ea6a1ce
2 changed files with 54 additions and 0 deletions
  1. +28
    -0
      dqcache
  2. +26
    -0
      tinysshd

+ 28
- 0
dqcache View File

@@ -0,0 +1,28 @@
#!/usr/bin/env /lib/init/init-d-script
### BEGIN INIT INFO
# Provides: dqcache
# Required-Start: $syslog $time $remote_fs networking
# Required-Stop: $syslog $time $remote_fs networking
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: DNS Cacher
# Description: Debian init script to start the dbcacher daemon
### END INIT INFO
DESC="DNS cacher daemon"
DAEMON=/usr/sbin/dqcache
PIDFILE=none
NAME="dqcache"
START_ARGS=--background

do_start_prepare() {
/bin/rm -f /var/lib/dqcache/root/dump/dnsdata
}

do_restart_prepare() {
do_start_prepare
}

export UID=$(id -u $NAME)
export GID=$(id -g $NAME)

echo $ROOT >&2

+ 26
- 0
tinysshd View File

@@ -0,0 +1,26 @@
#!/usr/bin/env /lib/init/init-d-script
### BEGIN INIT INFO
# Provides: dqcache
# Required-Start: $syslog $time networking
# Required-Stop: $syslog $time networking
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Tiny SSH Daemon
# Description: Init script to start/stop a tinysshd via socat daemon
### END INIT INFO
DESC="Tiny SSHD via socat"
NAME="socat(tinysshd)"
DAEMON=none

TINYSSHKEYS=/etc/tinyssh/keys

do_start_cmd() {
[ -d "$TINYSSHKEYS" ] || /usr/sbin/tinysshd-makekey "$TINYSSHKEYS"
exec /usr/bin/socat -lptinysshd \
tcp4-listen:22,fork exec:"/usr/sbin/tinysshd -l -v $TINYSSHKEYS" \
<&- 2>&- >&- &
}

do_stop_cmd() {
pkill -f lptinysshd
}

Loading…
Cancel
Save