Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compose.libre.sh
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ecobytes
compose.libre.sh
Commits
c59cb38b
Commit
c59cb38b
authored
8 years ago
by
Pierre Ozoux
Browse files
Options
Downloads
Patches
Plain Diff
add 2 little scripts
parent
fbcdb4ea
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
utils/add_cloud_user
+11
-0
11 additions, 0 deletions
utils/add_cloud_user
utils/add_to_group
+8
-0
8 additions, 0 deletions
utils/add_to_group
with
19 additions
and
0 deletions
utils/add_cloud_user
0 → 100755
+
11
−
0
View file @
c59cb38b
#!/bin/bash -eux
source
/etc/environment
user
=
$1
email
=
$2
quota
=
$3
curl
-X
POST
--user
${
cloud_admin
}
:
${
cloud_pass
}
https://
${
cloud_hostname
}
/ocs/v1.php/cloud/users
-d
userid
=
"
$1
"
-d
password
=
"
`
tr
-dc
A-Za-z0-9_ < /dev/urandom |
head
-c
10 | xargs
`
"
curl
-X
PUT
--user
${
cloud_admin
}
:
${
cloud_pass
}
https://
${
cloud_hostname
}
/ocs/v1.php/cloud/users/
${
user
}
-d
key
=
"email"
-d
value
=
"
${
email
}
"
curl
-X
PUT
--user
${
cloud_admin
}
:
${
cloud_pass
}
https://
${
cloud_hostname
}
/ocs/v1.php/cloud/users/
${
user
}
-d
key
=
"quota"
-d
value
=
"
${
quota
}
"
This diff is collapsed.
Click to expand it.
utils/add_to_group
0 → 100755
+
8
−
0
View file @
c59cb38b
#!/bin/bash -eux
source
/etc/environment
user
=
$1
group
=
$2
curl
-X
POST
--user
${
cloud_admin
}
:
${
cloud_pass
}
https://
${
cloud_hostname
}
/ocs/v1.php/cloud/users/
${
1
}
/groups
-d
groupid
=
"
${
2
}
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment