annotate macos/startupScripts.sh @ 19:a90e510ccc4f

fix restart/move logs
author Vadim Filimonov <fffilimonov@yandex.ru>
date Mon, 05 Aug 2024 11:29:06 +0300
parents dfc36e7ed22c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
1 cd ..
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
2 ROOTPWD=$(pwd);
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
3 IP=$(ifconfig en0 | awk '{if($0~"inet "){print $2}}');
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
4
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
5 user=$(whoami);
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
6
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
7 systemStarup='/Library/LaunchDaemons';
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
8 localStartup=${ROOTPWD}'/local/startup';
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
9 startup=${ROOTPWD}'/macos';
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
10
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
11 function addStartup() {
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
12 cd $localStartup;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
13 for file in *.plist; do
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
14 sudo ln -sf ${localStartup}/${file} ${systemStarup}/${file};
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
15 sudo chown root:wheel ${localStartup}/${file};
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
16 done;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
17 }