mirror of
https://github.com/YunoHost-Apps/diaspora_ynh.git
synced 2024-09-03 18:26:13 +02:00
fix final_path
This commit is contained in:
parent
0371e9f449
commit
7bf4eeed28
3 changed files with 9 additions and 9 deletions
|
@ -9,11 +9,11 @@ WorkingDirectory=__INSTALL_DIR__/live
|
||||||
Environment="__LD_PRELOAD__"
|
Environment="__LD_PRELOAD__"
|
||||||
Environment="RAILS_ENV=production"
|
Environment="RAILS_ENV=production"
|
||||||
Environment="__YNH_RUBY_LOAD_PATH__"
|
Environment="__YNH_RUBY_LOAD_PATH__"
|
||||||
ExecStart=__FINAL_PATH__/live/bin/bundle exec sidekiq
|
ExecStart=__INSTALL_DIR__/live/bin/bundle exec sidekiq
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
# Sandboxing options to harden security
|
# Sandboxing options to harden security
|
||||||
# Depending on specificities of your service/app, you may need to tweak these
|
# Depending on specificities of your service/app, you may need to tweak these
|
||||||
# .. but this should be a good baseline
|
# .. but this should be a good baseline
|
||||||
# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
|
# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
|
||||||
NoNewPrivileges=no
|
NoNewPrivileges=no
|
||||||
|
@ -40,7 +40,7 @@ CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM
|
||||||
CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
|
CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
|
||||||
CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
|
CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
|
||||||
CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
|
CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
|
||||||
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
|
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=__APP__.target
|
WantedBy=__APP__.target
|
||||||
|
|
|
@ -10,12 +10,12 @@ Environment="__LD_PRELOAD__"
|
||||||
Environment="RAILS_ENV=production"
|
Environment="RAILS_ENV=production"
|
||||||
Environment="__YNH_RUBY_LOAD_PATH__"
|
Environment="__YNH_RUBY_LOAD_PATH__"
|
||||||
PIDFile=/run/__APP__/diaspora.pid
|
PIDFile=/run/__APP__/diaspora.pid
|
||||||
ExecStart=__FINAL_PATH__/live/bin/bundle exec unicorn -c config/unicorn.rb -E production
|
ExecStart=__INSTALL_DIR__/live/bin/bundle exec unicorn -c config/unicorn.rb -E production
|
||||||
ExecReload=/bin/kill -USR2 $MAINPID
|
ExecReload=/bin/kill -USR2 $MAINPID
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
# Sandboxing options to harden security
|
# Sandboxing options to harden security
|
||||||
# Depending on specificities of your service/app, you may need to tweak these
|
# Depending on specificities of your service/app, you may need to tweak these
|
||||||
# .. but this should be a good baseline
|
# .. but this should be a good baseline
|
||||||
# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
|
# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
|
||||||
NoNewPrivileges=yes
|
NoNewPrivileges=yes
|
||||||
|
@ -42,7 +42,7 @@ CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM
|
||||||
CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
|
CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
|
||||||
CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
|
CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
|
||||||
CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
|
CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
|
||||||
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
|
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=__APP__.target
|
WantedBy=__APP__.target
|
||||||
|
|
|
@ -36,7 +36,7 @@ build_pkg_dependencies="$build_pkg_dependencies $build_ruby_dependencies"
|
||||||
# However, $PATH is duplicated into $ruby_path to outlast any manipulation of $PATH
|
# However, $PATH is duplicated into $ruby_path to outlast any manipulation of $PATH
|
||||||
# You can use the variable `$ynh_ruby_load_path` to quickly load your Ruby version
|
# You can use the variable `$ynh_ruby_load_path` to quickly load your Ruby version
|
||||||
# in $PATH for an usage into a separate script.
|
# in $PATH for an usage into a separate script.
|
||||||
# Exemple: $ynh_ruby_load_path $final_path/script_that_use_gem.sh`
|
# Exemple: $ynh_ruby_load_path $install_dir/script_that_use_gem.sh`
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Finally, to start a Ruby service with the correct version, 2 solutions
|
# Finally, to start a Ruby service with the correct version, 2 solutions
|
||||||
|
@ -81,7 +81,7 @@ ynh_use_ruby () {
|
||||||
ynh_ruby_load_path="PATH=$PATH"
|
ynh_ruby_load_path="PATH=$PATH"
|
||||||
|
|
||||||
# Sets the local application-specific Ruby version
|
# Sets the local application-specific Ruby version
|
||||||
pushd $final_path
|
pushd $install_dir
|
||||||
$rbenv_install_dir/bin/rbenv local $ruby_version
|
$rbenv_install_dir/bin/rbenv local $ruby_version
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ ynh_cleanup_ruby () {
|
||||||
required_ruby_versions="${installed_app_ruby_version}\n${required_ruby_versions}"
|
required_ruby_versions="${installed_app_ruby_version}\n${required_ruby_versions}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Remove no more needed Ruby versions
|
# Remove no more needed Ruby versions
|
||||||
local installed_ruby_versions=$(rbenv versions --bare --skip-aliases | grep -Ev '/')
|
local installed_ruby_versions=$(rbenv versions --bare --skip-aliases | grep -Ev '/')
|
||||||
for installed_ruby_version in $installed_ruby_versions
|
for installed_ruby_version in $installed_ruby_versions
|
||||||
|
|
Loading…
Reference in a new issue