aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authornemsia <nemsia@nemsia.org>2017-04-11 11:47:25 +0200
committerGitHub <noreply@github.com>2017-04-11 11:47:25 +0200
commitf4f12dad136b5447f76a92db94b6756f4464c090 (patch)
tree093d95ad163496e3db8bd4b079b97e6ea16c9fd7 /scripts
parentc893f503ab2dc6975b8ca582d0f9b7e914f2a447 (diff)
downloadmastodon_ynh-f4f12dad136b5447f76a92db94b6756f4464c090.tar.gz
mastodon_ynh-f4f12dad136b5447f76a92db94b6756f4464c090.tar.bz2
mastodon_ynh-f4f12dad136b5447f76a92db94b6756f4464c090.zip
Update .fonctions
Diffstat (limited to 'scripts')
-rw-r--r--scripts/.fonctions11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/.fonctions b/scripts/.fonctions
index 7d9c54d..902d62c 100644
--- a/scripts/.fonctions
+++ b/scripts/.fonctions
@@ -155,6 +155,15 @@ ynh_psql_create_user() {
"CREATE USER ${1} WITH PASSWORD '${2}';"
}
+# Create a user without password
+#
+# usage: ynh_mysql_create_user user pwd [host]
+# | arg: user - the user name to create
+ynh_psql_create_user_without_password() {
+ sudo su -c "psql" postgres <<< \
+ "CREATE USER ${1};"
+}
+
# Create a database and grant optionnaly privilegies to a user
#
# usage: ynh_mysql_create_db db [user [pwd]]
@@ -187,4 +196,4 @@ ynh_psql_drop_db() {
# | arg: user - the user name to drop
ynh_psql_drop_user() {
sudo su -c "dropuser ${1}" postgres
-} \ No newline at end of file
+}