Compare commits
No commits in common. "78d062c0195c39de8e8bc019276c5524c9f7c504" and "83bf64bd39bf21c84665135f0a1a7de13f96d768" have entirely different histories.
78d062c019
...
83bf64bd39
@ -47,16 +47,7 @@ mkdir -p %{buildroot}%{_localstatedir}/cache/client-manager
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
/usr/bin/getent passwd amgmt || /usr/sbin/useradd -r -m -g wheel -d /home/amgmt -s /sbin/nologin amgmt
|
/usr/bin/getent passwd amgmt || /usr/sbin/useradd -r -g wheel -d /home/amgmt -s /sbin/nologin amgmt
|
||||||
if [ ! -d /home/amgmt/.ssh ] ; then
|
|
||||||
mkdir -p /home/amgmt/.ssh
|
|
||||||
fi
|
|
||||||
chmod 0700 /home/amgmt /home/amgmt/.ssh
|
|
||||||
chown -R amgmt:wheel /home/amgmt
|
|
||||||
if [ ! -f /home/amgmt/.ssh/id_rsa ] ; then
|
|
||||||
cat /dev/zero | sudo -u amgmt ssh-keygen -q -N ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = 2 ]; then
|
if [ "$1" = 2 ]; then
|
||||||
#upgrade
|
#upgrade
|
||||||
/usr/bin/systemctl stop client-manager >/dev/null 2>&1 || :
|
/usr/bin/systemctl stop client-manager >/dev/null 2>&1 || :
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ] ; then
|
|
||||||
echo "Usage:"
|
|
||||||
echo "$0 [hostname]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
USER=$(db hosts getprop "$1" sshUser)
|
|
||||||
|
|
||||||
if [ "$USER" = "" ] ; then
|
|
||||||
echo "Can't find an user for $1"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
/usr/bin/sudo -u amgmt /usr/bin/ssh -o StrictHostKeyChecking=no ${USER}\@${1} ${@:2}
|
|
Loading…
x
Reference in New Issue
Block a user