mirror of
https://github.com/YunoHost-Apps/loki_ynh.git
synced 2024-09-03 19:36:16 +02:00
Rename binaries to simplify systemd services
This commit is contained in:
parent
c2d9711de6
commit
ab1af6ca2a
4 changed files with 10 additions and 2 deletions
|
@ -7,7 +7,7 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__INSTALL_DIR__/
|
||||
ExecStart=/bin/bash -c '__INSTALL_DIR__/loki-linux-__ARCH__ --config.file <(/bin/bash __INSTALL_DIR__/merge_yaml.sh /etc/__APP__/loki-default.yaml /etc/__APP__/loki.d/*.y{a,}ml)'
|
||||
ExecStart=/bin/bash -c '__INSTALL_DIR__/loki --config.file <(/bin/bash __INSTALL_DIR__/merge_yaml.sh /etc/__APP__/loki-default.yaml /etc/__APP__/loki.d/*.y{a,}ml)'
|
||||
StandardOutput=append:/var/log/__APP__/loki.log
|
||||
StandardError=inherit
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__INSTALL_DIR__/
|
||||
ExecStart=/bin/bash -c '__INSTALL_DIR__/promtail-linux-__ARCH__ --config.file <(/bin/bash __INSTALL_DIR__/merge_yaml.sh /etc/__APP__/promtail-default.yaml /etc/__APP__/promtail.d/*.y{a,}ml)'
|
||||
ExecStart=/bin/bash -c '__INSTALL_DIR__/promtail --config.file <(/bin/bash __INSTALL_DIR__/merge_yaml.sh /etc/__APP__/promtail-default.yaml /etc/__APP__/promtail.d/*.y{a,}ml)'
|
||||
StandardOutput=append:/var/log/__APP__/promtail.log
|
||||
StandardError=inherit
|
||||
|
||||
|
|
|
@ -17,6 +17,10 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
|||
ynh_setup_source --dest_dir="$install_dir" --source_id="loki"
|
||||
ynh_setup_source --dest_dir="$install_dir" --source_id="promtail"
|
||||
|
||||
# Rename the binaries to remove arch
|
||||
mv "$install_dir"/loki-linux-* "$install_dir"/loki
|
||||
mv "$install_dir"/promtail-linux-* "$install_dir"/promtail
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
|
|
@ -28,6 +28,10 @@ ynh_script_progression --message="Upgrading source files..." --weight=1
|
|||
ynh_setup_source --dest_dir="$install_dir" --source_id="loki" --full_replace=1
|
||||
ynh_setup_source --dest_dir="$install_dir" --source_id="promtail"
|
||||
|
||||
# Rename the binaries to remove arch
|
||||
mv "$install_dir"/loki-linux-* "$install_dir"/loki
|
||||
mv "$install_dir"/promtail-linux-* "$install_dir"/promtail
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
|
Loading…
Add table
Reference in a new issue