###### tags: `ハッカソン` # 自動起動設定 Pythonをクローンして、設置。 ```shell= git clone https://github.com/yasyasyu/Phackathon2020.git cp -r ./Phackathon2020/test /home/hoge/test ``` 絶対パス変更点 : send.py : /home/test/privacy/URLFILE ntpの設定。 ```shell= timedatectl set-timezone Asia/Tokyo sudo apt install ntpdate sudo ntpdate -u ntp.nict.jp sudo nano /usr/bin/checkdate.sh #!/bin/sh /usr/sbin/ntpdate ntp.jst.mfeed.ad.jp sudo chmod 700 /usr/bin/checkdate.sh ``` cron設定。 ```shell= crontab -e ``` ```shell= 45 23 * * * /python3の絶対パス/python3 /絶対パス/send.py 55 23 * * * sh /usr/bin/checkdate.sh 56 23 * * * sudo /sbin/reboot ``` cron起動。 ```shell= sudo systemctl start cron.service sudo systemctl enable cron.service sudo systemctl status cron.service ``` 再起動時、起動するファイルを指定。 ```shell= sudo chmod u+x /etc/rc.local sudo nano /etc/rc.local /python3の絶対パス/python3 /絶対パス/scan.py ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up