mirror of
https://github.com/YunoHost-Apps/shiori_ynh.git
synced 2024-09-03 20:26:17 +02:00
cleaning
This commit is contained in:
parent
fb13f3f2e5
commit
844098aac3
4 changed files with 27 additions and 3 deletions
4
conf/.env
Normal file
4
conf/.env
Normal file
|
@ -0,0 +1,4 @@
|
|||
SHIORI_HTTP_PORT=__PORT__
|
||||
SHIORI_HTTP_ROOT_PATH=__PATH__
|
||||
SHIORI_DIR=__DATA_DIR__"
|
||||
SHIORI_HTTP_SECRET_KEY=__KEY__"
|
|
@ -7,10 +7,10 @@ After=network-online.target
|
|||
Type=simple
|
||||
User=__APP__
|
||||
Group=__APP__
|
||||
EnvironmentFile="__INSTALL_DIR__/.env"
|
||||
WorkingDirectory=__INSTALL_DIR__/
|
||||
ExecStart=__INSTALL_DIR__/shiori server --port __PORT__ --webroot __PATH__
|
||||
ExecStart=__INSTALL_DIR__/shiori server
|
||||
Restart=always
|
||||
Environment="SHIORI_DIR=__DATA_DIR__"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -12,6 +12,16 @@ ynh_setup_source --dest_dir="$install_dir"
|
|||
|
||||
chmod +x "$install_dir/shiori"
|
||||
|
||||
#=================================================
|
||||
# APP INITIAL CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression "Adding $app's configuration files..."
|
||||
|
||||
ynh_add_config --template=".env" --destination="$install_dir/.env"
|
||||
|
||||
chmod 400 "$install_dir/.env"
|
||||
chown "$app:$app" "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -15,10 +15,20 @@ ynh_systemctl --service=$app --action="stop" --log_path="systemd"
|
|||
#=================================================
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep=".env"
|
||||
|
||||
chmod +x "$install_dir/shiori"
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating $app's configuration files..." --weight=1
|
||||
|
||||
ynh_add_config --template=".env" --destination="$install_dir/.env"
|
||||
|
||||
chmod 400 "$install_dir/.env"
|
||||
chown "$app:$app" "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# MIGRATE AND UPGRADE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue