move example to proper location (and install it)
This commit is contained in:
parent
100e7cee7c
commit
6a7273907b
|
@ -72,6 +72,7 @@ my_app_dir=$(mktemp -d)
|
||||||
installer_base="https://git.daplie.com/Daplie/goldilocks.js/raw/master"
|
installer_base="https://git.daplie.com/Daplie/goldilocks.js/raw/master"
|
||||||
|
|
||||||
my_app_etc_config="etc/${my_app_name}/${my_app_name}.yml"
|
my_app_etc_config="etc/${my_app_name}/${my_app_name}.yml"
|
||||||
|
my_app_etc_example_config="etc/${my_app_name}/${my_app_name}.example.yml"
|
||||||
my_app_systemd_service="etc/systemd/system/${my_app_name}.service"
|
my_app_systemd_service="etc/systemd/system/${my_app_name}.service"
|
||||||
my_app_systemd_tmpfiles="etc/tmpfiles.d/${my_app_name}.conf"
|
my_app_systemd_tmpfiles="etc/tmpfiles.d/${my_app_name}.conf"
|
||||||
my_app_launchd_service="Library/LaunchDaemons/${my_app_pkg_name}.plist"
|
my_app_launchd_service="Library/LaunchDaemons/${my_app_pkg_name}.plist"
|
||||||
|
@ -122,6 +123,11 @@ install_for_launchd()
|
||||||
|
|
||||||
install_etc_config()
|
install_etc_config()
|
||||||
{
|
{
|
||||||
|
$sudo_cmd mkdir -p $(dirname "$MY_ROOT/$my_app_etc_example_config")
|
||||||
|
mkdir -p $(dirname "$my_app_dir/$my_app_etc_example_config")
|
||||||
|
dap_dl "$installer_base/$my_app_etc_example_config" "$my_app_dir/$my_app_etc_example_config"
|
||||||
|
$sudo_cmd mv "$my_app_dir/$my_app_etc_example_config" "$MY_ROOT/$my_app_etc_example_config"
|
||||||
|
|
||||||
if [ ! -e "$MY_ROOT/$my_app_etc_config" ]; then
|
if [ ! -e "$MY_ROOT/$my_app_etc_config" ]; then
|
||||||
$sudo_cmd mkdir -p $(dirname "$MY_ROOT/$my_app_etc_config")
|
$sudo_cmd mkdir -p $(dirname "$MY_ROOT/$my_app_etc_config")
|
||||||
mkdir -p $(dirname "$my_app_dir/$my_app_etc_config")
|
mkdir -p $(dirname "$my_app_dir/$my_app_etc_config")
|
||||||
|
|
Loading…
Reference in New Issue