correct basename -> dirname
This commit is contained in:
parent
dad2e66f52
commit
953bdda67e
11
install.sh
11
install.sh
|
@ -98,7 +98,9 @@ install_for_systemd()
|
||||||
$sudo_cmd systemctl start "${my_app_name}.service"
|
$sudo_cmd systemctl start "${my_app_name}.service"
|
||||||
$sudo_cmd systemctl enable "${my_app_name}.service"
|
$sudo_cmd systemctl enable "${my_app_name}.service"
|
||||||
|
|
||||||
echo "$my_app_name started with systemctl"
|
echo "$my_app_name started with systemctl, check its status like so"
|
||||||
|
echo " $sudo_cmd systemctl status $my_app_name"
|
||||||
|
echo " $sudo_cmd journalctl -xe"
|
||||||
}
|
}
|
||||||
|
|
||||||
install_for_launchd()
|
install_for_launchd()
|
||||||
|
@ -121,13 +123,14 @@ install_for_launchd()
|
||||||
install_etc_config()
|
install_etc_config()
|
||||||
{
|
{
|
||||||
if [ ! -e "$MY_ROOT/$my_app_etc_config" ]; then
|
if [ ! -e "$MY_ROOT/$my_app_etc_config" ]; then
|
||||||
mkdir -p $(basename "$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")
|
||||||
dap_dl "$installer_base/$my_app_etc_config" "$my_app_dir/$my_app_etc_config"
|
dap_dl "$installer_base/$my_app_etc_config" "$my_app_dir/$my_app_etc_config"
|
||||||
$sudo_cmd mv "$my_app_dir/$my_app_etc_config" "$MY_ROOT/$my_app_etc_config"
|
$sudo_cmd mv "$my_app_dir/$my_app_etc_config" "$MY_ROOT/$my_app_etc_config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$sudo_cmd chown -R www-data:www-data $(basename "$MY_ROOT/$my_app_etc_config")
|
$sudo_cmd chown -R www-data:www-data $(dirname "$MY_ROOT/$my_app_etc_config")
|
||||||
$sudo_cmd chmod 775 $(basename "$MY_ROOT/$my_app_etc_config")
|
$sudo_cmd chmod 775 $(dirname "$MY_ROOT/$my_app_etc_config")
|
||||||
$sudo_cmd chmod 664 "$MY_ROOT/$my_app_etc_config"
|
$sudo_cmd chmod 664 "$MY_ROOT/$my_app_etc_config"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue