annotate backup/macos/startupScripts.sh @ 1831:8f9ae295bf6a default tip

add Hosted.authorize
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 26 Sep 2024 15:07:45 -0600
parents 45eaaf5146f3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1693
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
1 cd ..
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
2 ROOTPWD=$(pwd);
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
3
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
4 user=$(whoami);
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
5
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
6 systemStarup='/Library/LaunchDaemons';
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
7 localStartup=${ROOTPWD}'/local/startup';
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
8 startup=${ROOTPWD}'/macos';
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
9
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
10 function addStartup() {
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
11 cd $localStartup;
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
12 for file in *.plist; do
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
13 sudo ln -sf ${localStartup}/${file} ${systemStarup}/${file};
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
14 sudo chown root:wheel ${localStartup}/${file};
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
15 done;
45eaaf5146f3 add backup autostart
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
16 }