mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
Merge branch 'master' into master
This commit is contained in:
commit
8584df0b54
3 changed files with 9 additions and 3 deletions
|
@ -110,6 +110,13 @@ SETUP_SOURCE () { # Download source, decompress and copu into $final_path
|
||||||
fi
|
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 SCRIPT
|
||||||
|
|
||||||
REMOVE_NGINX_CONF () { # Delete nginx configuration
|
REMOVE_NGINX_CONF () { # Delete nginx configuration
|
||||||
|
|
|
@ -165,7 +165,7 @@ type rbenv
|
||||||
BCOMMANDS
|
BCOMMANDS
|
||||||
|
|
||||||
# Add Services
|
# Add Services
|
||||||
pushd $(popd)
|
popd
|
||||||
|
|
||||||
sudo cp ../conf/mastodon-web.service /etc/systemd/system/mastodon-web.service
|
sudo cp ../conf/mastodon-web.service /etc/systemd/system/mastodon-web.service
|
||||||
sudo chown root: /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
|
# Install crontab
|
||||||
sudo cp ../conf/crontab_mastodon /etc/cron.d/$app
|
sudo cp ../conf/crontab_mastodon /etc/cron.d/$app
|
||||||
sudo sed -i "s@__APP__@$app@g" /etc/cron.d/$app
|
sudo sed -i "s@__APP__@$app@g" /etc/cron.d/$app
|
||||||
# Restart crontab
|
|
||||||
sudo systemctl restart cron
|
|
||||||
|
|
||||||
# Unprotected url
|
# Unprotected url
|
||||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
ynh_app_setting_set "$app" unprotected_uris "/"
|
||||||
|
|
|
@ -104,6 +104,7 @@ sudo cp -a ./sources/. "$final_path"
|
||||||
# Set permissions
|
# Set permissions
|
||||||
sudo chown -R $app: "$final_path"
|
sudo chown -R $app: "$final_path"
|
||||||
|
|
||||||
|
# Debug
|
||||||
sudo ls -alh "$final_path"
|
sudo ls -alh "$final_path"
|
||||||
|
|
||||||
# Set UTF8 encoding by default
|
# Set UTF8 encoding by default
|
||||||
|
|
Loading…
Reference in a new issue