안드로이드에서 부팅 때에 특정 shell 스크립트 동작 시키기
SELinux Disable 하기 보안 상의 이유로 부팅 때 특정 shell 스크립트가 동작하게 하려면 SELinux 예외 처리를 해야하는 작업이 필요합니다. 저는 단순히 SELinux를 부팅 때 disable 시키는 방법으로 shell 스크립트를 실행하였습니다.…
0 Comments
March 24, 2017
SELinux Disable 하기 보안 상의 이유로 부팅 때 특정 shell 스크립트가 동작하게 하려면 SELinux 예외 처리를 해야하는 작업이 필요합니다. 저는 단순히 SELinux를 부팅 때 disable 시키는 방법으로 shell 스크립트를 실행하였습니다.…
1. script #!/bin/sh dir=/home/user/backup/homepage/db/test time=`date +%Y%m%d` mysqldump -uroot -p12345 test > "test_"$time".sql" tar czf $dir"/test_"$time".tar.gz" "test_"$time".sql" rm -rf "test_"$time".sql" #find $dir -atime +2 -print -exec rm -rf {} ; dir=/home/user/backup/homepage/db/test…