Compare commits
No commits in common. "0cfb4bc2bea55340ab3756a33fcc557e9dc62807" and "9fa560e5c2472ee4267241760110234e90dc64c2" have entirely different histories.
0cfb4bc2be
...
9fa560e5c2
|
@ -1 +0,0 @@
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKhS4voo3K/Dvzqckr0bouO1WkCI5XxswstHWnuuyKBz ltp1-bd
|
|
|
@ -1 +0,0 @@
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHLYgVj+NPino6sOmahULN7SbAMaVAgzqPfDjz2S8zDv pc1
|
|
|
@ -8,8 +8,6 @@ adduser \
|
||||||
--gecos "jumpserver user ssh" \
|
--gecos "jumpserver user ssh" \
|
||||||
ssh
|
ssh
|
||||||
|
|
||||||
usermod -p '*' ssh
|
|
||||||
|
|
||||||
insert_if_not_exist()
|
insert_if_not_exist()
|
||||||
{
|
{
|
||||||
filename=$1
|
filename=$1
|
||||||
|
@ -20,6 +18,6 @@ insert_if_not_exist()
|
||||||
grep -qxF -- "$line" "$filename" || echo "$line" >> "$filename"
|
grep -qxF -- "$line" "$filename" || echo "$line" >> "$filename"
|
||||||
}
|
}
|
||||||
|
|
||||||
insert_if_not_exist "/etc/crontabs/root" "*/5 * * * * cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/jumpserver_cron.sh"
|
insert_if_not_exist "/etc/crontab" "*/5 * * * * cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/jumpserver_cron.sh"
|
||||||
|
|
||||||
"$THIS_DIR"/jumpserver_cron.sh
|
"$THIS_DIR"/jumpserver_cron.sh
|
||||||
|
|
3
scripts/nasp
Normal file → Executable file
3
scripts/nasp
Normal file → Executable file
|
@ -1,5 +1,4 @@
|
||||||
%nasp ALL = (root) NOPASSWD: /usr/bin/docker
|
%nasp ALL = (root) NOPASSWD: /usr/bin/docker
|
||||||
%nasp ALL = (root) NOPASSWD: /usr/sbin/reboot
|
%nasp ALL = (root) NOPASSWD: /usr/sbin/reboot
|
||||||
%nasp ALL = (root) NOPASSWD: /usr/bin/whoami
|
%nasp ALL = (root) NOPASSWD: /usr/bin/whoami
|
||||||
%nasp ALL = (root) NOPASSWD: /usr/bin/nvidia-smi
|
|
||||||
%nasp ALL = (root) NOPASSWD: /usr/sbin/shutdown
|
|
||||||
|
|
|
@ -15,6 +15,6 @@ insert_if_not_exist()
|
||||||
grep -qxF -- "$line" "$filename" || echo "$line" >> "$filename"
|
grep -qxF -- "$line" "$filename" || echo "$line" >> "$filename"
|
||||||
}
|
}
|
||||||
|
|
||||||
insert_if_not_exist "/etc/crontab" "*/5 * * * * root cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/testbed_cron.sh"
|
insert_if_not_exist "/etc/crontab" "*/5 * * * * cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/testbed_cron.sh"
|
||||||
|
|
||||||
"$THIS_DIR"/testbed_cron.sh
|
"$THIS_DIR"/testbed_cron.sh
|
||||||
|
|
Loading…
Reference in New Issue
Block a user