mirror of
https://github.com/YunoHost-Apps/plume_ynh.git
synced 2024-09-03 20:15:54 +02:00
Removed spawn as no way to run export in it
This commit is contained in:
parent
899e8dce7f
commit
af7af47b7f
3 changed files with 70 additions and 13 deletions
22
conf/instance.txt
Normal file
22
conf/instance.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
INSERT INTO instances (
|
||||
public_domain,
|
||||
name,
|
||||
local,
|
||||
long_description,
|
||||
short_description,
|
||||
default_license,
|
||||
open_registrations,
|
||||
short_description_html,
|
||||
long_description_html
|
||||
) VALUES (
|
||||
domain_name,
|
||||
instance_name,
|
||||
't',
|
||||
'',
|
||||
'',
|
||||
'CC-0',
|
||||
't',
|
||||
'',
|
||||
''
|
||||
);
|
||||
|
47
conf/pass.txt
Normal file
47
conf/pass.txt
Normal file
|
@ -0,0 +1,47 @@
|
|||
/* to generate the password, in a shell */
|
||||
|
||||
apt install python-bcrypt
|
||||
python -c 'import bcrypt; print(bcrypt.hashpw("PASSWORD", bcrypt.gensalt(log_rounds=10)))'
|
||||
|
||||
/* to generate the keypair, in a shell */
|
||||
|
||||
openssl genrsa -passout pass:PASSWORD -out private.pem 2048
|
||||
openssl rsa -in private.pem -passin pass:PASSWORD -pubout -out public.pub
|
||||
|
||||
/** private.pem now contains the private key, public.pub the public one **/
|
||||
|
||||
/* SQL command to create the user */
|
||||
|
||||
INSERT INTO users (
|
||||
username,
|
||||
display_name,
|
||||
outbox_url,
|
||||
inbox_url,
|
||||
is_admin,
|
||||
summary,
|
||||
email,
|
||||
hashed_password,
|
||||
instance_id,
|
||||
ap_url,
|
||||
public_key,
|
||||
private_key,
|
||||
shared_inbox_url,
|
||||
followers_endpoint,
|
||||
avatar_id,
|
||||
) VALUES (
|
||||
username,
|
||||
display_name,
|
||||
'https://' || domain_name || '/@/' || username || '/outbox',
|
||||
'https://' || domain_name || '/@/' || username || '/inbox',
|
||||
't',
|
||||
'Admin of ' || instance_name,
|
||||
email,
|
||||
hashed_password,
|
||||
1,
|
||||
'https://' || domain_name || '/@/' || username,
|
||||
pub_key,
|
||||
priv_key,
|
||||
'https://' || domain_name || '/inbox',
|
||||
'https://' || domain_name || '/inbox',
|
||||
NULL
|
||||
);
|
|
@ -160,18 +160,6 @@ ynh_replace_string "__DB_USER__" "$app" "$final_path/.env"
|
|||
# Set right permissions
|
||||
chown -R $app: $final_path
|
||||
|
||||
# spawn test
|
||||
pass="test"
|
||||
blog_name="test"
|
||||
admin="test"
|
||||
email="test@domain.tld"
|
||||
admin_pass="test123"
|
||||
|
||||
# Copy first run script
|
||||
cp ../conf/first_run.exp $final_path
|
||||
chmod +x $final_path/first_run.exp
|
||||
|
||||
|
||||
# We escape all char witch needed.
|
||||
ynh_replace_special_string "__PASSWORD__" $pass "$final_path/first_run.exp"
|
||||
ynh_replace_special_string "__ADMIN_PASS__" $admin_pass "$final_path/first_run.exp"
|
||||
|
@ -195,7 +183,7 @@ ynh_secure_remove "$final_path/first_launch.exp"
|
|||
### - And the section "SETUP SYSTEMD" in the upgrade script
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
# ynh_add_systemd_config
|
||||
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue