Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のphpスクリプトでは、次のような行を使用してスクリプトを実行します。
exec('sudo -u USERNAME ./script.sh', $result)
スクリプトはユーザー USERNAME によって正しく実行されますが、Apache を停止するかクラッシュすると、スクリプトも強制終了されます。そのスクリプトをユーザー USERNAME として実行し、スクリプトを強制終了せずに apache をオフにする方法は?