-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathagent.sh
39 lines (33 loc) · 786 Bytes
/
agent.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
container_id=$(docker ps --filter "name=outlineadmin" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Container not found. Please ensure that the container is running."
exit 1
fi
create_admin_user() {
docker exec -it "$container_id" bash -c "php artisan admin:make"
}
reset_admin_password() {
docker exec -it "$container_id" bash -c "php artisan admin:password"
}
echo "Select an option:"
echo "1. Create Admin User"
echo "2. Reset Admin Password"
echo "3. Exit"
read -rp ">>> " choice
case $choice in
1)
create_admin_user
;;
2)
reset_admin_password
;;
3)
echo "🤚 Exiting..."
exit 0
;;
*)
echo "😑 Invalid choice. Exiting..."
exit 1
;;
esac