Skip to content

Commit 535e49e

Browse files
committed
ensure bash
1 parent c6a8b5d commit 535e49e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git clone https://github.com/maildev/maildev ./mailcatcher -b v2.0.5
88
cd /usr/local/hestia/plugins/mailcatcher || exit
99
rsync -r ./src/ /opt/mailcatcher
1010
chown -R mailcatcher:mailcatcher /opt/mailcatcher
11-
runuser -l mailcatcher -c "cd /opt/mailcatcher && source /opt/nvm/nvm.sh && nvm use v16 && npm install"
11+
runuser -s /bin/bash -l mailcatcher -c "cd /opt/mailcatcher && source /opt/nvm/nvm.sh && nvm use v16 && npm install"
1212

1313

1414
# Swap out sendmail for mailcatcher

mailcatcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public function setup( $user, $domain ) {
7171
}
7272

7373
// Start mailcatcher if not started
74-
$cmd = 'if ! runuser -l "mailcatcher" -c "cd /opt/mailcatcher && source /opt/nvm/nvm.sh && pm2 list" | grep -q "mailcatcher_app"; ';
75-
$cmd .= 'then runuser -l "mailcatcher" -c "cd /opt/mailcatcher && source /opt/nvm/nvm.sh ; pm2 start mailcatcher.config.js"; fi';
74+
$cmd = 'if ! runuser -s /bin/bash -l "mailcatcher" -c "cd /opt/mailcatcher && source /opt/nvm/nvm.sh && pm2 list" | grep -q "mailcatcher_app"; ';
75+
$cmd .= 'then runuser -s /bin/bash -l "mailcatcher" -c "cd /opt/mailcatcher && source /opt/nvm/nvm.sh ; pm2 start mailcatcher.config.js"; fi';
7676
shell_exec( $cmd );
7777
}
7878

uninstall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
runuser -l mailcatcher -c "cd /opt/mailcatcher && source /opt/nvm/nvm.sh && pm2 delete mailcatcher ; pm2 save --force"
2+
runuser -s /bin/bash -l mailcatcher -c "cd /opt/mailcatcher && source /opt/nvm/nvm.sh && pm2 delete mailcatcher ; pm2 save --force"
33
rm -rf /opt/mailcatcher
44
deluser mailcatcher
55
rm -rf /home/mailcatcher

0 commit comments

Comments
 (0)