Skip to content

Commit eab159c

Browse files
committed
explicit --disableAI flag
1 parent 1f9e993 commit eab159c

File tree

3 files changed

+40
-15
lines changed

3 files changed

+40
-15
lines changed

install_scripts/setup_phoenix_ai_control_linux.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@ show_help() {
99
echo " sudo ./setup_phoenix_ai_control_linux.sh [--managedByEmail <email>] [--allowedUsers <user1,user2,...>]"
1010
echo
1111
echo "Options:"
12-
echo " --managedByEmail Optional. Admin email who manages AI policy."
12+
echo " --managedByEmail Optional. Admin email who manages AI policy. Can be used in your"
13+
echo " Phoenix managed AI dashboard to selectively enable features and"
14+
echo " manage usage quotas."
1315
echo " --allowedUsers Optional. Comma-separated list of Linux usernames allowed to use AI."
16+
echo " --disableAI Optional. If present, AI will be disabled by default."
17+
echo " If not present, AI will be enabled."
1418
echo
1519
echo "Examples:"
1620
echo " sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail [email protected]"
1721
echo " sudo ./setup_phoenix_ai_control_linux.sh --allowedUsers alice,bob"
18-
echo " sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail [email protected] --allowedUsers alice,bob"
22+
echo " sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail [email protected] --allowedUsers alice,bob --disableAI"
1923
echo
2024
echo "Help:"
2125
echo " ./setup_phoenix_ai_control_linux.sh --help"
2226
echo
23-
echo "NOTE: sudo privileges are required to make changes,"
24-
echo " but not to view this help information."
27+
2528
echo
2629
exit 1
2730
}
@@ -42,6 +45,7 @@ fi
4245
# Parse arguments
4346
managedByEmail=""
4447
allowedUsers=""
48+
disableAI=false
4549

4650
while [[ $# -gt 0 ]]; do
4751
key="$1"
@@ -57,6 +61,10 @@ while [[ $# -gt 0 ]]; do
5761
allowedUsers="$2"
5862
shift 2
5963
;;
64+
--disableAI)
65+
disableAI=true
66+
shift
67+
;;
6068
*)
6169
echo "Unknown option: $1"
6270
show_help
@@ -75,7 +83,7 @@ fi
7583

7684
# Start creating the JSON content
7785
json_content='{'
78-
json_content+='"disableAI": true'
86+
json_content+='"disableAI": '$disableAI''
7987

8088
# Add managedByEmail if specified
8189
if [ -n "$managedByEmail" ]; then

install_scripts/setup_phoenix_ai_control_mac.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@ show_help() {
99
echo " sudo ./setup_phoenix_ai_control_mac.sh [--managedByEmail <email>] [--allowedUsers <user1,user2,...>]"
1010
echo
1111
echo "Options:"
12-
echo " --managedByEmail Optional. Admin email who manages AI policy."
12+
echo " --managedByEmail Optional. Admin email who manages AI policy. Can be used in your"
13+
echo " Phoenix managed AI dashboard to selectively enable features and"
14+
echo " manage usage quotas."
1315
echo " --allowedUsers Optional. Comma-separated list of macOS usernames allowed to use AI."
16+
echo " --disableAI Optional. If present, AI will be disabled by default."
17+
echo " If not present, AI will be enabled."
1418
echo
1519
echo "Examples:"
1620
echo " sudo ./setup_phoenix_ai_control_mac.sh --managedByEmail [email protected]"
1721
echo " sudo ./setup_phoenix_ai_control_mac.sh --allowedUsers alice,bob"
18-
echo " sudo ./setup_phoenix_ai_control_mac.sh --managedByEmail [email protected] --allowedUsers alice,bob"
22+
echo " sudo ./setup_phoenix_ai_control_mac.sh --managedByEmail [email protected] --allowedUsers alice,bob --disableAI"
1923
echo
2024
echo "Help:"
2125
echo " ./setup_phoenix_ai_control_mac.sh --help"
2226
echo
23-
echo "NOTE: sudo privileges are required to make changes,"
24-
echo " but not to view this help information."
27+
2528
echo
2629
exit 1
2730
}
@@ -42,6 +45,7 @@ fi
4245
# Parse arguments
4346
managedByEmail=""
4447
allowedUsers=""
48+
disableAI=false
4549

4650
while [[ $# -gt 0 ]]; do
4751
key="$1"
@@ -57,6 +61,10 @@ while [[ $# -gt 0 ]]; do
5761
allowedUsers="$2"
5862
shift 2
5963
;;
64+
--disableAI)
65+
disableAI=true
66+
shift
67+
;;
6068
*)
6169
echo "Unknown option: $1"
6270
show_help
@@ -75,7 +83,7 @@ fi
7583

7684
# Start creating the JSON content
7785
json_content='{'
78-
json_content+='"disableAI": true'
86+
json_content+='"disableAI": '$disableAI''
7987

8088
# Add managedByEmail if specified
8189
if [ -n "$managedByEmail" ]; then

install_scripts/setup_phoenix_ai_control_win.bat

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if %errorlevel% neq 0 (
1717
:: Parse args
1818
set "managedByEmail="
1919
set "allowedUsers="
20+
set "disableAI=false"
2021
:parse_args
2122
if "%~1"=="" goto :continue
2223
if "%~1"=="--managedByEmail" (
@@ -31,6 +32,11 @@ if "%~1"=="--allowedUsers" (
3132
shift
3233
goto :parse_args
3334
)
35+
if "%~1"=="--disableAI" (
36+
set "disableAI=true"
37+
shift
38+
goto :parse_args
39+
)
3440
echo Unknown option: %~1
3541
goto :help
3642
:continue
@@ -44,7 +50,7 @@ if not exist "%TARGET_DIR%" (
4450
:: Start writing JSON
4551
(
4652
echo {
47-
echo "disableAI": true
53+
echo "disableAI": %disableAI%
4854
:: Conditionally write managedByEmail
4955
if defined managedByEmail (
5056
echo ,"managedByEmail": "%managedByEmail%"
@@ -78,19 +84,22 @@ echo Usage:
7884
echo setup_phoenix_ai_control_win.bat [--managedByEmail <email>] [--allowedUsers <user1,user2,...>]
7985
echo.
8086
echo Options:
81-
echo --managedByEmail Optional. Admin email who manages AI policy.
87+
echo --managedByEmail Optional. Admin email who manages AI policy. Can be used in your
88+
echo Phoenix managed AI dashboard to selectively enable features and
89+
echo manage usage quotas.
8290
echo --allowedUsers Optional. Comma-separated list of Windows usernames allowed to use AI.
91+
echo --disableAI Optional. If present, AI will be disabled by default.
92+
echo If not present, AI will be enabled.
8393
echo.
8494
echo Examples:
8595
echo setup_phoenix_ai_control_win.bat --managedByEmail [email protected]
8696
echo setup_phoenix_ai_control_win.bat --allowedUsers Alice,Bob
87-
echo setup_phoenix_ai_control_win.bat --managedByEmail [email protected] --allowedUsers Alice,Bob
97+
echo setup_phoenix_ai_control_win.bat --managedByEmail [email protected] --allowedUsers Alice,Bob --disableAI
8898
echo.
8999
echo Help:
90100
echo setup_phoenix_ai_control_win.bat --help
91101
echo setup_phoenix_ai_control_win.bat /?
92102
echo.
93-
echo NOTE: Administrator privileges are required to make changes,
94-
echo but not to view this help information.
103+
95104
echo.
96105
exit /b 1

0 commit comments

Comments
 (0)