OS/Ubuntu

Shell Script 양식 - Root 권한으로 프로그램 설치

Lute3r 2016. 3. 30. 00:21


Shell Script 양식 - Root 권한으로 프로그램 설치




#!/bin/bash

if [ $UID -ne 0 ]; then
    sudo $0
else

    apt-get update
    apt-get upgrade -y

    apt-get clean
    apt-get autoclean

fi

exit 0





test.sh





반응형