init
This commit is contained in:
commit
1816522a71
11 changed files with 229 additions and 0 deletions
18
lib/privileges
Normal file
18
lib/privileges
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
escalate_command() {
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
$@
|
||||
else
|
||||
sudo -E $@
|
||||
fi
|
||||
}
|
||||
|
||||
escalate() {
|
||||
export SC_ESCALATED=1
|
||||
export SC_SKIP_WELCOME_HEADER=1
|
||||
|
||||
echo "e: sc-client $@"
|
||||
|
||||
escalate_command $(get_first_in_list $SC_COMMAND) $@
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue