# $Id: Makefile,v 1.3 2000/01/28 08:34:57 swg72 Exp swg72 $ WORK = /home/work SWG72 = $(WORK)/swg72-1_0.tgz APACHE = $(WORK)/apache-1_3_9-swg72.tgz POSTGRES = $(WORK)/postgres-6_5_3-swg72.tgz all: install: useradd apache postgres swg72 rc cron site_perl @echo "SWG72サーバのインストールが完了しました" useradd: @echo "ユーザを作成します..." -@useradd -s /bin/tcsh swg72 -@useradd -s /bin/tcsh apache -@useradd -s /bin/tcsh postgres swg72: @echo "SWG72サーバを展開します..." @su - $@ -c "zcat $(SWG72) | tar xf -" apache: @echo "WWWサーバを展開します..." @su - $@ -c "zcat $(APACHE) | tar xf -" postgres: @echo "PostgreSQLサーバを展開します..." @su - $@ -c "zcat $(POSTGRES) | tar xf -" rc: @echo "自動起動スクリプトを登録します..." @cd ~swg72/rc3.d; make cron: @echo "時間起動スクリプトを登録します..." @su - postgres -c "crontab swg72.crontab" site_perl: @echo "SWG72用Perlライブラリを登録します..." @cd /usr/lib/perl5; \ if [ ! -d site_perl.ORG ]; then \ mv site_perl site_perl.ORG; \ ln -s /home/swg72/site_perl .; \ fi backup: -mv *.tgz old cd ~swg72; tar cf - . | gzip > $(SWG72) cd ~apache; tar cf - . | gzip > $(APACHE) cd ~postgres; tar cf - . | gzip > $(POSTGRES) clean: cd ~swg72/rc3.d; make stop; make clean -su - postgres -c "crontab -r" cd /usr/lib/perl5; \ if [ -d site_perl.ORG ]; then \ rm -f site_perl; \ mv site_perl.ORG site_perl; \ fi -userdel -r swg72 -userdel -r apache -userdel -r postgres