diff options
| author | nemsia <nemsia@nemsia.org> | 2017-05-06 23:01:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-06 23:01:35 +0200 |
| commit | f12507fbf0e8fd46346d8c25d64796df58acf37b (patch) | |
| tree | 48a015876e620fbcc358ac66a3ebd1103c73c001 /scripts | |
| parent | 40624b08e370303c1e43d9eb17481b555bb2d586 (diff) | |
| parent | 8b811b73436e64fee016e2a8f18a6e49601287cf (diff) | |
| download | mastodon_ynh-f12507fbf0e8fd46346d8c25d64796df58acf37b.tar.gz mastodon_ynh-f12507fbf0e8fd46346d8c25d64796df58acf37b.tar.bz2 mastodon_ynh-f12507fbf0e8fd46346d8c25d64796df58acf37b.zip | |
Merge branch 'devel' into master
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/.fonctions | 7 | ||||
| -rw-r--r-- | scripts/install | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/scripts/.fonctions b/scripts/.fonctions index 064a0c9..20f9ea0 100644 --- a/scripts/.fonctions +++ b/scripts/.fonctions @@ -110,6 +110,13 @@ SETUP_SOURCE () { # Download source, decompress and copu into $final_path fi } +# Create user with special hack +CREATE_USER () { + sudo curl -kSs https://${domain}/auth/sign_up --cookie-jar cookie | grep csrf > token || true + token=$(sudo cat token | sed -n '/csrf-token/s/.*name="csrf-token"\s\+content="\([^"]\+\).*/\1/p') + sudo curl -kSs https://${domain}/auth --data "&user[account_attributes][username]=${admin_mastodon}&user[email]=${admin_mastodon}@${domain}&user[password]=${admin_pass}&user[password_confirmation]=${admin_pass}&authenticity_token=${token}" --cookie cookie +} + ### REMOVE SCRIPT REMOVE_NGINX_CONF () { # Delete nginx configuration diff --git a/scripts/install b/scripts/install index 806fec2..2fd4b23 100644 --- a/scripts/install +++ b/scripts/install @@ -206,8 +206,6 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf # Install crontab sudo cp ../conf/crontab_mastodon /etc/cron.d/$app sudo sed -i "s@__APP__@$app@g" /etc/cron.d/$app -# Restart crontab -sudo systemctl restart cron # Unprotected url ynh_app_setting_set "$app" unprotected_uris "/" |
