correct basename -> dirname

This commit is contained in:
AJ ONeal 2017-05-08 17:04:36 -06:00
parent dad2e66f52
commit 953bdda67e
1 changed files with 7 additions and 4 deletions

View File

@ -98,7 +98,9 @@ install_for_systemd()
$sudo_cmd systemctl start "${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()
@ -121,13 +123,14 @@ install_for_launchd()
install_etc_config()
{
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"
$sudo_cmd mv "$my_app_dir/$my_app_etc_config" "$MY_ROOT/$my_app_etc_config"
fi
$sudo_cmd chown -R www-data:www-data $(basename "$MY_ROOT/$my_app_etc_config")
$sudo_cmd chmod 775 $(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 $(dirname "$MY_ROOT/$my_app_etc_config")
$sudo_cmd chmod 664 "$MY_ROOT/$my_app_etc_config"
}