Skip to content

Instantly share code, notes, and snippets.

@tadasuke
Created June 11, 2015 08:35
Show Gist options
  • Save tadasuke/406306d3acbb18bc7176 to your computer and use it in GitHub Desktop.
Save tadasuke/406306d3acbb18bc7176 to your computer and use it in GitHub Desktop.
シェルスクリプトでsudoを実行する ref: http://qiita.com/tadasuke/items/fcf563bbce33aa93c4c7
echo "パスワード" | sudo -S /etc/rc.d/init.d/httpd restart
hoge ALL=(ALL) /etc/rc.d/init.d/httpd,/etc/rc.d/init.d/mysqld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment