view host/macos/startupScripts.sh @ 2111:2a0da93eb0f4 ssltesting

nginx conf relative path fix
author Violet7
date Fri, 19 Dec 2025 02:02:17 -0800
parents dd10659fcdb9
children
line wrap: on
line source

cd ..
ROOTPWD=$(pwd);
IP=$(ifconfig en0 | awk '{if($0~"inet "){print $2}}');

user=$(whoami);

systemStarup='/Library/LaunchDaemons';
localStartup=${ROOTPWD}'/local/startup';
startup=${ROOTPWD}'/macos';

function addStartup() {
  cd $localStartup;
  for file in *.plist; do
    sudo ln -sf ${localStartup}/${file} ${systemStarup}/${file};
    sudo chown root:wheel ${localStartup}/${file};
    sudo launchctl unload ${systemStarup}/${file};
    sudo launchctl load ${systemStarup}/${file};
  done;
}