File: change_default_shell

package info (click to toggle)
fusionforge 5.3.2%2B20141104-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 60,472 kB
  • sloc: php: 271,846; sql: 36,817; python: 14,575; perl: 6,406; sh: 5,980; xml: 4,294; pascal: 1,411; makefile: 911; cpp: 52; awk: 27
file content (9 lines) | stat: -rwxr-xr-x 228 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
#!/bin/sh
if [ $(id -u) != 0 ] ; then
    echo "You must be root to run this, please enter passwd"
    exec su -c "$0 $1"
fi

su -s /bin/sh gforge -c psql gforge <<-FIN
ALTER TABLE users ALTER COLUMN shell SET DEFAULT '$1';
FIN