2017-06-09 15:41:37 +02:00
|
|
|
#!/bin/bash
|
2020-07-05 19:14:29 +02:00
|
|
|
|
2022-05-29 12:45:09 +02:00
|
|
|
#=================================================
|
|
|
|
# COMMON VARIABLES
|
|
|
|
#=================================================
|
|
|
|
|
2022-09-30 03:21:49 +02:00
|
|
|
ruby_version=2.7
|
2022-05-29 12:45:09 +02:00
|
|
|
nodejs_version=14
|
2022-09-27 01:22:29 +02:00
|
|
|
bundler_version=2.1.4
|
2022-05-29 12:45:09 +02:00
|
|
|
|
2023-07-26 22:17:42 +02:00
|
|
|
# jemalloc seems to be better for ROR apps, let's use it
|
|
|
|
case $YNH_ARCH in
|
|
|
|
amd64)
|
|
|
|
arch="x86_64"
|
|
|
|
;;
|
|
|
|
arm64)
|
|
|
|
arch="aarch64"
|
|
|
|
;;
|
|
|
|
armel|armhf)
|
|
|
|
arch="arm"
|
|
|
|
;;
|
|
|
|
i386)
|
|
|
|
arch="i386"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
ld_preload="LD_PRELOAD=/usr/lib/$arch-linux-gnu/libjemalloc.so"
|
2022-05-29 12:45:09 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# PERSONAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
2024-02-29 10:11:40 +01:00
|
|
|
_ynh_add_systemd_target() {
|
|
|
|
ynh_add_config --template="diaspora.target" --destination="/etc/systemd/system/${app}.target"
|
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl enable "${app}.target" --quiet
|
|
|
|
}
|
|
|
|
_ynh_remove_systemd_target() {
|
|
|
|
systemctl stop "${app}.target"
|
|
|
|
systemctl disable "${app}.target" --quiet
|
|
|
|
ynh_secure_remove --file="/etc/systemd/system/${app}.target"
|
|
|
|
systemctl daemon-reload
|
|
|
|
}
|
|
|
|
|
2022-05-29 12:45:09 +02:00
|
|
|
#=================================================
|
|
|
|
# EXPERIMENTAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# FUTURE OFFICIAL HELPERS
|
|
|
|
#=================================================
|