fix(testbed/cron): support nixos
This commit is contained in:
parent
aec64a8d54
commit
937bf9e000
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
THIS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd )
|
||||
|
||||
|
@ -46,7 +46,10 @@ update_key() {
|
|||
}
|
||||
|
||||
main() {
|
||||
cp "$THIS_DIR/nasp" "/etc/sudoers.d/nasp"
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
test "$ID" = "nixos" || cp "$THIS_DIR/nasp" "/etc/sudoers.d/nasp"
|
||||
fi
|
||||
for file in "$THIS_DIR"/../authorized_keys/* ; do
|
||||
if [[ ! -d "$file" ]]; then
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue
Block a user