-
-
Save normanlolx/91411e5494f5e04e000a7cf28df95447 to your computer and use it in GitHub Desktop.
Revisions
-
Norman Kämper-Leymann revised this gist
Jul 3, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,7 @@ if ( isset($_POST['payload']) && $_POST['payload'] ) { echo shell_exec('cd /var/www/mydrupal/ && sudo -u myuser git pull'); echo shell_exec('cd /var/www/mydrupal/sites/all/themes/mytheme/ && sudo -u myuser node ./node_modules/gulp/bin/gulp.js mygulptask'); // Adding the drush will cause the delivery being displayed as unsuccessful. Means GitHub doesn't wait so long. The command will run nevertheless. echo shell_exec('cd /var/www/mydrupal/ && sudo -u myuser drush @sites cc all -y'); } -
Norman Kämper-Leymann revised this gist
Jul 3, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,7 @@ if ( isset($_POST['payload']) && $_POST['payload'] ) { echo shell_exec('cd /var/www/mydrupal/ && sudo -u myuser git pull'); echo shell_exec('cd /var/www/mydrupal/sites/all/themes/mytheme/ && sudo -u myuser node ./node_modules/gulp/bin/gulp.js mygulptask'); echo shell_exec('cd /var/www/mydrupal/ && sudo -u myuser drush @sites cc all -y'); } // Should return www-data -
Norman Kämper-Leymann revised this gist
Jul 3, 2017 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,10 @@ echo shell_exec('cd /var/www/mydrupal/ && sudo -u myuser git pull'); echo shell_exec('cd /var/www/mydrupal/sites/all/themes/mytheme/ && sudo -u myuser node ./node_modules/gulp/bin/gulp.js mygulptask'); } // Should return www-data echo shell_exec('whoami'); // Should return myuser echo shell_exec('sudo -u myuser whoami'); ?> -
Norman Kämper-Leymann revised this gist
Jul 3, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,5 +4,7 @@ echo shell_exec('cd /var/www/mydrupal/ && sudo -u myuser git pull'); echo shell_exec('cd /var/www/mydrupal/sites/all/themes/mytheme/ && sudo -u myuser node ./node_modules/gulp/bin/gulp.js mygulptask'); } // echo shell_exec('whoami'); // echo shell_exec('sudo -u apc whoami'); ?> -
Norman Kämper-Leymann renamed this gist
Jul 3, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Norman Kämper-Leymann revised this gist
Jul 3, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,4 +5,4 @@ echo shell_exec('cd /var/www/mydrupal/sites/all/themes/mytheme/ && sudo -u myuser node ./node_modules/gulp/bin/gulp.js mygulptask'); } ?> -
Norman Kämper-Leymann revised this gist
Jul 3, 2017 . No changes.There are no files selected for viewing
-
Norman Kämper-Leymann revised this gist
Jul 3, 2017 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,8 @@ <?php if ( isset($_POST['payload']) && $_POST['payload'] ) { echo shell_exec('cd /var/www/mydrupal/ && sudo -u myuser git pull'); echo shell_exec('cd /var/www/mydrupal/sites/all/themes/mytheme/ && sudo -u myuser node ./node_modules/gulp/bin/gulp.js mygulptask'); } ?>hi -
Norman Kämper-Leymann revised this gist
Jul 3, 2017 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,5 @@ <?php if ( $_POST['payload'] ) { echo shell_exec( 'git pull' ); } -
Norman Kämper-Leymann revised this gist
Jul 3, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ // Use in the "Post-Receive URLs" section of your GitHub repo. if ( $_POST['payload'] ) { echo shell_exec( 'git pull' ); } ?>hi -
Norman Kämper-Leymann revised this gist
Jul 3, 2017 . No changes.There are no files selected for viewing
-
Norman Kämper-Leymann renamed this gist
Jul 3, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
cowboy created this gist
Oct 11, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ <?php // Use in the "Post-Receive URLs" section of your GitHub repo. if ( $_POST['payload'] ) { shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' ); } ?>hi