mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
Merge branch 'devel' into master
This commit is contained in:
commit
f12507fbf0
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 "/"
|
||||
|
|
Loading…
Add table
Reference in a new issue