Beginning to implement setup
This commit is contained in:
parent
f6be394720
commit
d2e7c773b6
2 changed files with 6 additions and 6 deletions
|
@ -4,6 +4,11 @@
|
|||
# Copyright (C) 2024 rail5
|
||||
# Free software (GNU Affero GPL v3)
|
||||
|
||||
if [[ "$(whoami)" != root ]]; then
|
||||
echo "Autobuild setup must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
system_tmp_directory=$(dirname "$(mktemp -u)")
|
||||
local_storage_directory="/var/autobuild"
|
||||
autobuild_directory="/usr/share/autobuild"
|
||||
|
|
|
@ -7,10 +7,7 @@
|
|||
echo $$ # Echo the PID as the first line of output
|
||||
# This is so other processes can terminate the autobuild daemon early if desired
|
||||
|
||||
if [ "$(whoami)" == "root" ]; then
|
||||
echo "Warning: autobuild should NOT be run as root."
|
||||
sleep 1
|
||||
elif [ "$(whoami)" != "_autobuild" ]; then
|
||||
if [[ "$(whoami)" != "_autobuild" ]]; then
|
||||
echo "Warning: The autobuild daemon should not be run directly"
|
||||
sleep 1
|
||||
fi
|
||||
|
@ -782,8 +779,6 @@ while true; do
|
|||
shift 2 ;;
|
||||
-s | --setup )
|
||||
# Handled by the autobuild client
|
||||
# Although I think it might have to move back here somehow or something
|
||||
# Users can't modify things in /var/autobuild by themselves
|
||||
shift ;;
|
||||
-- ) shift; break ;;
|
||||
* ) break ;;
|
||||
|
|
Loading…
Reference in a new issue