diff options
| author | nemsia <nemsia@nemsia.org> | 2017-05-07 23:21:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-07 23:21:52 +0200 |
| commit | 8584df0b547189dd86d34e4b0bbf342814524352 (patch) | |
| tree | 7886531a5f036eceb5fdc847078fd296a4f35e67 | |
| parent | a4a3f5cce430684b26e81613dffc3b88a1c12a95 (diff) | |
| parent | f12507fbf0e8fd46346d8c25d64796df58acf37b (diff) | |
| download | mastodon_ynh-8584df0b547189dd86d34e4b0bbf342814524352.tar.gz mastodon_ynh-8584df0b547189dd86d34e4b0bbf342814524352.tar.bz2 mastodon_ynh-8584df0b547189dd86d34e4b0bbf342814524352.zip | |
Merge branch 'master' into master
| -rw-r--r-- | scripts/.fonctions | 7 | ||||
| -rw-r--r-- | scripts/install | 4 | ||||
| -rw-r--r-- | scripts/restore | 1 |
3 files changed, 9 insertions, 3 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 3357c1d..2fd4b23 100644 --- a/scripts/install +++ b/scripts/install @@ -165,7 +165,7 @@ type rbenv BCOMMANDS # Add Services -pushd $(popd) +popd sudo cp ../conf/mastodon-web.service /etc/systemd/system/mastodon-web.service sudo chown root: /etc/systemd/system/mastodon-web.service @@ -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 "/" diff --git a/scripts/restore b/scripts/restore index f9861ff..3a2eeaf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -104,6 +104,7 @@ sudo cp -a ./sources/. "$final_path" # Set permissions sudo chown -R $app: "$final_path" +# Debug sudo ls -alh "$final_path" # Set UTF8 encoding by default |
