12 lines
607 B
Bash
Executable File
12 lines
607 B
Bash
Executable File
#!/bin/sh
|
|
# Installs the host connector's helpers and their sudo rule. Run as
|
|
# root on each host the connector reaches.
|
|
set -eu
|
|
here=$(dirname "$0")
|
|
install -d -m 755 /usr/local/libexec/archie
|
|
install -m 755 -o root -g root "$here/directory-sizes" "$here/old-files" "$here/delete-old-files" "$here/timer-control" /usr/local/libexec/archie/
|
|
install -d -m 755 /etc/archie
|
|
for f in delete-roots timers; do [ -e "/etc/archie/$f" ] || install -m 644 -o root -g root /dev/null "/etc/archie/$f"; done
|
|
install -m 440 -o root -g root "$here/sudoers" /etc/sudoers.d/archie-host
|
|
visudo -cf /etc/sudoers.d/archie-host
|