mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
1.0.7 + ldap
This commit is contained in:
parent
6000fad7bc
commit
c331d56d0e
7 changed files with 72 additions and 40 deletions
|
@ -25,7 +25,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post
|
|||
- Tootdon (Android + iOS)
|
||||
- Tootle (iOS)
|
||||
|
||||
**Shipped version:** 1.0.1
|
||||
**Shipped version:** 1.0.7
|
||||
|
||||
## Important points to read before installing
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/45357/artifacts/download
|
||||
SOURCE_SUM=3f223062fca6010abd36aaf9c3ebee8d1c808012ed26639df49103a8969c5af0
|
||||
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/63065/artifacts/download
|
||||
SOURCE_SUM=3a6c57ce974751dbfc97832af22020df4ff6355c710b30013dfac9fffab74fa4
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=pleroma-v1.0.1.zip
|
||||
SOURCE_FILENAME=pleroma-v1.0.7.zip
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/45359/artifacts/download
|
||||
SOURCE_SUM=68f0b6e09b423eb1df5774a7fc4aac1518aa3df27cdaae5b824b73ec8839d7f7
|
||||
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/63067/artifacts/download
|
||||
SOURCE_SUM=fd7ebb7689723bf2874e5fd3ff5c2b8261045d868d4f8e8c9699bee8e1f28a10
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=pleroma-v1.0.1.zip
|
||||
SOURCE_FILENAME=pleroma-v1.0.7.zip
|
||||
|
|
|
@ -9,7 +9,7 @@ config :pleroma, Pleroma.Web.Endpoint,
|
|||
url: [host: "__DOMAIN__", scheme: "https", port: 443],
|
||||
secret_key_base: "__KEY__",
|
||||
signing_salt: "__SIGNING_SALT__",
|
||||
http: [ip: {127, 0, 0, 1}, port: __PORT__]
|
||||
http: [ip: {127, 0, 0, 1}, port: 8095]
|
||||
|
||||
config :pleroma, :instance,
|
||||
name: "__INSTANCE_NAME__",
|
||||
|
@ -81,3 +81,15 @@ config :pleroma, Pleroma.Uploaders.Local, uploads: "__DATADIR__/uploads"
|
|||
# storage_url: "https://swift-endpoint.prodider.com/v1/AUTH_<tenant>/<container>",
|
||||
# object_url: "https://cdn-endpoint.provider.com/<container>"
|
||||
#
|
||||
|
||||
config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.LDAPAuthenticator
|
||||
config :pleroma, :ldap,
|
||||
enabled: true,
|
||||
host: "localhost",
|
||||
port: 389,
|
||||
ssl: false,
|
||||
# sslopts: [],
|
||||
tls: false,
|
||||
# tlsopts: [],
|
||||
base: "ou=users,dc=yunohost,dc=org",
|
||||
uid: "cn"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/45355/artifacts/download
|
||||
SOURCE_SUM=426013286094411c5e53330515cc6601b41fab4b8a53b724b7739f92c95154a2
|
||||
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/63063/artifacts/download
|
||||
SOURCE_SUM=f248a074baed3a36fbccaf89cc5d643d57eae43ee22c50dd720da5206b89d125
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=pleroma-v1.0.1.zip
|
||||
SOURCE_FILENAME=pleroma-v1.0.7.zip
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Pleroma is an OStatus-compatible social networking server written in Elixir, compatible with GNU Social and Mastodon",
|
||||
"fr": "Pleroma est un réseau social écrit en Elixir, compatible avec OStatus, GNU Social et Mastodon"
|
||||
},
|
||||
"version": "1.0.1~ynh1",
|
||||
"version": "1.0.7~ynh1",
|
||||
"url": "https://git.pleroma.social/pleroma/pleroma",
|
||||
"license": "AGPL-3.0-only",
|
||||
"maintainer": [
|
||||
|
@ -69,8 +69,8 @@
|
|||
"en": "Choose a name for your Pleroma instance",
|
||||
"fr": "Choisissez un nom pour votre instance Pleroma"
|
||||
},
|
||||
"example": "My Pleroma",
|
||||
"default": "My Pleroma"
|
||||
"example": "My_Pleroma",
|
||||
"default": "My_Pleroma"
|
||||
},
|
||||
{
|
||||
"name": "registration",
|
||||
|
|
|
@ -179,32 +179,32 @@ chown -R $app /etc/$app
|
|||
|
||||
config="/etc/$app/config.exs"
|
||||
|
||||
cp -f ../conf/generated_config.exs $config
|
||||
#cp -f ../conf/generated_config.exs $config
|
||||
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$config"
|
||||
ynh_replace_string --match_string="__KEY__" --replace_string="$random_key" --target_file="$config"
|
||||
ynh_replace_string --match_string="__SIGNING_SALT__" --replace_string="$signing_salt" --target_file="$config"
|
||||
ynh_replace_string --match_string="__INSTANCE_NAME__" --replace_string="$name" --target_file="$config"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$config"
|
||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$config"
|
||||
ynh_replace_string --match_string="__ADMIN_EMAIL__" --replace_string="$admin_email" --target_file="$config"
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config"
|
||||
ynh_replace_string --match_string="__DATADIR__" --replace_string="$datadir" --target_file="$config"
|
||||
# ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$config"
|
||||
#ynh_replace_string --match_string="__KEY__" --replace_string="$random_key" --target_file="$config"
|
||||
#ynh_replace_string --match_string="__SIGNING_SALT__" --replace_string="$signing_salt" --target_file="$config"
|
||||
# ynh_replace_string --match_string="__INSTANCE_NAME__" --replace_string="$name" --target_file="$config"
|
||||
# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$config"
|
||||
# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$config"
|
||||
# ynh_replace_string --match_string="__ADMIN_EMAIL__" --replace_string="$admin_email" --target_file="$config"
|
||||
# ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config"
|
||||
# ynh_replace_string --match_string="__DATADIR__" --replace_string="$datadir" --target_file="$config"
|
||||
|
||||
if [ $cache -eq 1 ]
|
||||
then
|
||||
ynh_replace_string --match_string="__MEDIA_CACHE__" --replace_string="true" --target_file="$config"
|
||||
else
|
||||
ynh_replace_string --match_string="__MEDIA_CACHE__" --replace_string="false" --target_file="$config"
|
||||
fi
|
||||
#if [ $cache -eq 1 ]
|
||||
#then
|
||||
# ynh_replace_string --match_string="__MEDIA_CACHE__" --replace_string="true" --target_file="$config"
|
||||
#else
|
||||
# ynh_replace_string --match_string="__MEDIA_CACHE__" --replace_string="false" --target_file="$config"
|
||||
#fi
|
||||
|
||||
# Set registrations open/closed
|
||||
if [ $registration -eq 1 ]
|
||||
then
|
||||
ynh_replace_string --match_string="__REG__" --replace_string="true" --target_file="$config"
|
||||
else
|
||||
ynh_replace_string --match_string="__REG__" --replace_string="false" --target_file="$config"
|
||||
fi
|
||||
#if [ $registration -eq 1 ]
|
||||
#then
|
||||
# ynh_replace_string --match_string="__REG__" --replace_string="true" --target_file="$config"
|
||||
#else
|
||||
# ynh_replace_string --match_string="__REG__" --replace_string="false" --target_file="$config"
|
||||
#fi
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
@ -222,12 +222,32 @@ ynh_add_systemd_config
|
|||
chown -R "$app":"$app" "$final_path"
|
||||
|
||||
pushd $final_path/$app
|
||||
su "$app" -s $SHELL -lc "PLEROMA_CONFIG_PATH=$config $final_path/$app/bin/pleroma_ctl migrate"
|
||||
su "$app" -s $SHELL -lc "$final_path/$app/bin/pleroma_ctl instance gen --force \
|
||||
--output $config \
|
||||
--output-psql /tmp/setup_db.psql \
|
||||
--domain $domain \
|
||||
--instance-name \"$name\" \
|
||||
--admin-email $admin_email \
|
||||
--notify-email $admin_email \
|
||||
--dbhost localhost \
|
||||
--dbname $db_name \
|
||||
--dbuser $db_user \
|
||||
--dbpass $db_pwd \
|
||||
--rum N \
|
||||
--indexable Y \
|
||||
--db-configurable Y \
|
||||
--uploads-dir $datadir/uploads \
|
||||
--static-dir $datadir/static \
|
||||
--listen-ip 127.0.0.1 \
|
||||
--listen-port $port"
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="check_if_time_to_update"
|
||||
su "$app" -s $SHELL -lc "$final_path/$app/bin/pleroma_ctl migrate"
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Started $app social network."
|
||||
sleep 20
|
||||
|
||||
# Add user
|
||||
su pleroma -s $SHELL -lc "PLEROMA_CONFIG_PATH=$config $final_path/$app/bin/pleroma_ctl user new $admin $admin_email --password $password --moderator --admin -y"
|
||||
su pleroma -s $SHELL -lc "$final_path/$app/bin/pleroma_ctl user new $admin $admin_email --password $password --moderator --admin -y"
|
||||
|
||||
#Generate key pair
|
||||
#sudo -u "$app" MIX_ENV=prod mix web_push.gen.keypair >> "config/prod.secret.exs"
|
||||
|
@ -272,7 +292,7 @@ yunohost service add $app --description "$app daemon for Pleroma" --log "/var/lo
|
|||
#=================================================
|
||||
ynh_print_info --message="Starting a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="restart" --log_path=systemd --line_match="Started pleroma"
|
||||
ynh_systemd_action --service_name=$app --action="restart" --log_path=systemd --line_match="Started $app social network."
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
Loading…
Add table
Reference in a new issue