annotate host/startupScripts.sh @ 1633:665049cffc02

fix path
author fffilimonov
date Tue, 14 Dec 2021 07:55:47 -0600
parents 0344a535b1db
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1631
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
1 ROOTPWD=$(pwd);
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
2 IP=$(ifconfig en0 | awk '{if($0~"inet "){print $2}}');
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
3
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
4 user=$(whoami);
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
5
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
6 systemStarup='/Library/LaunchDaemons';
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
7 localStartup=${ROOTPWD}'/local/startup';
1632
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
8 startup=${ROOTPWD}'/startup/macos';
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
9 startupPostgres=${ROOTPWD}'/startup/postgres/macos';
1631
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
10
1632
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
11 function addStartup() {
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
12 cd $localStartup;
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
13 for file in *.plist; do
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
14 sudo ln -sf ${localStartup}/${file} ${systemStarup}/${file};
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
15 sudo chown root:wheel ${localStartup}/${file};
0344a535b1db add doc
fffilimonov
parents: 1631
diff changeset
16 done;
1631
35c626c06dd5 add startup scripts for mac os
fffilimonov
parents:
diff changeset
17 }