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 [ -z "$AUTOSSH_LOGFILE" ] && 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
26 echo "Remove $var file"
31 DSAFILES
="/$HOME/.ssh/id_dsa*"
32 if ls $DSAFILES &> /dev
/null
; then
35 echo "No dsa files in $(realpath $DSAFILES)"
38 for i
in $DSAFILES ; do
39 file_permission
="$(stat -c "%a
" $i)"
40 if [ "$file_permission" == "600" ] ||
[ "$file_permission" == "400" ]; then
43 echo "Permissions $file_permission for $i are too open."
49 $VERBOSE && echo "File $1 permission is ok"
56 #Fix for import init function