mirror of
https://github.com/YunoHost-Apps/photoprism_ynh.git
synced 2024-09-03 19:56:41 +02:00
Revert "change build directory to binaries"
This reverts commit 4db29f0f62
.
This commit is contained in:
parent
4db29f0f62
commit
816f9475cb
3 changed files with 13 additions and 11 deletions
|
@ -7,7 +7,7 @@ Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__FINALPATH__/
|
WorkingDirectory=__FINALPATH__/
|
||||||
ExecStart=__FINALPATH__/binaries/bin/photoprism --config-path __FINALPATH__/binaries/config/ --trace start
|
ExecStart=__FINALPATH__/build/bin/photoprism --config-path __FINALPATH__/build/config/ --trace start
|
||||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,8 @@ pushd "$final_path"
|
||||||
# Setup node environment
|
# Setup node environment
|
||||||
export NODE_OPTIONS=--max_old_space_size=1024
|
export NODE_OPTIONS=--max_old_space_size=1024
|
||||||
# Build server from source
|
# Build server from source
|
||||||
make all install DESTDIR=$final_path/binaries 2>&1
|
ynh_secure_remove --file="$final_path/build"
|
||||||
|
make all install DESTDIR=$final_path/build 2>&1
|
||||||
ynh_secure_remove --file="$final_path/go"
|
ynh_secure_remove --file="$final_path/go"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -163,7 +164,7 @@ ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
||||||
|
|
||||||
mkdir -p $datadir
|
mkdir -p $datadir
|
||||||
mkdir "$datadir/assets/"
|
mkdir "$datadir/assets/"
|
||||||
mv "$final_path/binaries/assets/"* "$datadir/assets/"
|
mv "$final_path/build/assets/"* "$datadir/assets/"
|
||||||
|
|
||||||
chmod 750 "$datadir"
|
chmod 750 "$datadir"
|
||||||
chmod -R o-rwx "$datadir"
|
chmod -R o-rwx "$datadir"
|
||||||
|
@ -175,9 +176,9 @@ chown -R $app:www-data "$datadir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..." --time --weight=1
|
ynh_script_progression --message="Adding a configuration file..." --time --weight=1
|
||||||
|
|
||||||
ynh_add_config --template="options.yml" --destination="$final_path/binaries/config/options.yml"
|
ynh_add_config --template="options.yml" --destination="$final_path/build/config/options.yml"
|
||||||
chmod 400 "$final_path/binaries/config/options.yml"
|
chmod 400 "$final_path/build/config/options.yml"
|
||||||
chown $app:$app "$final_path/binaries/config/options.yml"
|
chown $app:$app "$final_path/build/config/options.yml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
|
|
@ -121,7 +121,8 @@ pushd "$final_path"
|
||||||
# Setup node environment
|
# Setup node environment
|
||||||
export NODE_OPTIONS=--max_old_space_size=1024
|
export NODE_OPTIONS=--max_old_space_size=1024
|
||||||
# Build server from source
|
# Build server from source
|
||||||
make all install DESTDIR=$final_path/binaries 2>&1
|
ynh_secure_remove --file="$final_path/build"
|
||||||
|
make all install DESTDIR=$final_path/build 2>&1
|
||||||
ynh_secure_remove --file="$final_path/go"
|
ynh_secure_remove --file="$final_path/go"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -132,7 +133,7 @@ ynh_script_progression --message="Updating data directory..." --time --weight=1
|
||||||
|
|
||||||
ynh_secure_remove --file="$datadir/assets"
|
ynh_secure_remove --file="$datadir/assets"
|
||||||
mkdir "$datadir/assets/"
|
mkdir "$datadir/assets/"
|
||||||
mv "$final_path/binaries/assets/"* "$datadir/assets/"
|
mv "$final_path/build/assets/"* "$datadir/assets/"
|
||||||
|
|
||||||
chmod 750 "$datadir"
|
chmod 750 "$datadir"
|
||||||
chmod -R o-rwx "$datadir"
|
chmod -R o-rwx "$datadir"
|
||||||
|
@ -143,9 +144,9 @@ chown -R $app:www-data "$datadir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating a configuration file..." --time --weight=1
|
ynh_script_progression --message="Updating a configuration file..." --time --weight=1
|
||||||
|
|
||||||
ynh_add_config --template="options.yml" --destination="$final_path/binaries/config/options.yml"
|
ynh_add_config --template="options.yml" --destination="$final_path/build/config/options.yml"
|
||||||
chmod 400 "$final_path/binaries/config/options.yml"
|
chmod 400 "$final_path/build/config/options.yml"
|
||||||
chown $app:$app "$final_path/binaries/config/options.yml"
|
chown $app:$app "$final_path/build/config/options.yml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
|
Loading…
Add table
Reference in a new issue