2 # autosshd-conf shell for autosshd that export variables from root to _anyssh user
6 # Source function library.
7 .
/etc
/init.d
/functions
9 # AutoSSHDaemon configuration
10 SYSCONFIGFILE
="/etc/sysconfig/autosshd"
11 SourceIfNotEmpty
$SYSCONFIGFILE
12 AUTOSSH_PIDFILE
=${PIDFILEDIR}/$
(basename $1 .conf
).pid
13 AUTOSSH_LOCKFILE
=${LOCKFILEDIR}/$
(basename $1 .conf
).lck
14 AUTOSSH_LOGFILE
=/var
/lib
/autosshd
/$
(basename $1 .conf
).log
15 export AUTOSSH_LOGFILE AUTOSSH_LOCKFILE AUTOSSH_PIDFILE AUTOSSH_LOGLEVEL AUTOSSH_POLL AUTOSSH_GATETIME AUTOSSH_DEBUG
21 AUTOSSH_FILES
="$AUTOSSH_LOGFILE" # "$AUTOSSH_LOCKFILE $AUTOSSH_PIDFILE"
22 for var
in $AUTOSSH_FILES ; do
23 if [ -w "$var" ] ||
[ ! -e "$var" ]; then
24 $VERBOSE && is_ok
$var
26 echo "Remove $var file"
31 for i
in ~
/.ssh
/id_dsa
* ; do
32 if [ $
(stat
-c "%a" $i)=="600" ]; then
35 echo "Permissions $(stat -c "%a
" $i) for $i are too open."
41 $VERBOSE && echo "File $1 permission is ok"
48 #Fix for import init function