mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
17 lines
551 B
Bash
17 lines
551 B
Bash
#!/bin/bash
|
|
|
|
# Add a systemd configuration using ynh_add_systemd_config,
|
|
# by replacing __PORT__ with the $port variable value.
|
|
mattermost_add_systemd_config () {
|
|
local config_path="../conf"
|
|
|
|
# Replace variables in the systemd template config file
|
|
sed -i'.template' "s/__PORT__/$port/g" "$config_path/systemd.service"
|
|
|
|
# Create a dedicated systemd config
|
|
ynh_add_systemd_config
|
|
|
|
# Restore the original configuration template
|
|
rm "$config_path/systemd.service"
|
|
mv "$config_path/systemd.service.template" "$config_path/systemd.service"
|
|
}
|