Skip to content

Commit

Permalink
remove /etc/default/lsc (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coutadeur committed Jan 19, 2024
1 parent fbaf281 commit 3231239
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 38 deletions.
1 change: 0 additions & 1 deletion src/install/debian/lsc.install
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ lib/* usr/lib/lsc
## sample
sample/* usr/share/doc/lsc
## systemd
etc/default/lsc etc/default
etc/default/lsc-sync etc/default
etc/default/lsc-async etc/default
## nagios
Expand Down
6 changes: 0 additions & 6 deletions src/install/debian/lsc.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ sed -i 's:^CFG_DIR.*:CFG_DIR="/etc/lsc":' /usr/bin/lsc /usr/bin/lsc-agent /usr/b
sed -i 's:^LIB_DIR.*:LIB_DIR="/usr/lib/lsc":' /usr/bin/lsc /usr/bin/lsc-agent /usr/bin/hsqldb
sed -i "s:^LOG_DIR.*:LOG_DIR=\"${lsc_logdir}\":" /usr/bin/lsc /usr/bin/lsc-agent /usr/bin/hsqldb
sed -i 's:^VAR_DIR.*:VAR_DIR="/var/lsc":' /usr/bin/hsqldb
## init
sed -i 's:^LSC_BIN.*:LSC_BIN="/usr/bin/lsc":' /etc/default/lsc
sed -i 's:^LSC_CFG_DIR.*:LSC_CFG_DIR="/etc/lsc":' /etc/default/lsc
sed -i 's:^LSC_USER.*:LSC_USER="lsc":' /etc/default/lsc
sed -i 's:^LSC_GROUP.*:LSC_GROUP="lsc":' /etc/default/lsc
sed -i 's:^LSC_PID_FILE.*:LSC_PID_FILE="/var/run/lsc.pid":' /etc/default/lsc

# Copy sample configuration for a fresh install
[ -f /etc/lsc/lsc.xml ] || cp /usr/share/doc/lsc/lsc.xml-sample /etc/lsc/lsc.xml
Expand Down
16 changes: 0 additions & 16 deletions src/install/etc/default/lsc

This file was deleted.

6 changes: 3 additions & 3 deletions src/install/etc/default/lsc-async
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LSC_JMXPORT="1099"
#JAVA_HOME=/usr/java/jdk/jre

LSC_CONFIG_DIR="/etc/lsc"
LSC_SYNC_TASKS=""
LSC_ASYNC_TASKS="-a exampletask"
LSC_CLEAN_TASKS=""
#LSC_SYNC_TASKS=""
LSC_ASYNC_TASKS="-a all"
#LSC_CLEAN_TASKS=""
LSC_EXTRA_ARGS=""
6 changes: 3 additions & 3 deletions src/install/etc/default/lsc-sync
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LSC_JMXPORT="1099"
#JAVA_HOME=/usr/java/jdk/jre

LSC_CONFIG_DIR="/etc/lsc"
LSC_SYNC_TASKS="-s exampletask"
LSC_ASYNC_TASKS=""
LSC_CLEAN_TASKS="-c exampletask"
LSC_SYNC_TASKS="-s all"
#LSC_ASYNC_TASKS=""
LSC_CLEAN_TASKS="-c all"
LSC_EXTRA_ARGS=""
2 changes: 1 addition & 1 deletion src/install/lib/systemd/system/lsc-async.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Environment="LSC_CONFIG_DIR=/etc/lsc"
Environment="LSC_ASYNC_TASKS=-a all"
Environment="LSC_EXTRA_ARGS="
Environment="LSC_JMXPORT="
EnvironmentFile=-/etc/default/lsc
EnvironmentFile=-/etc/default/lsc-async
ExecStartPre=/usr/bin/lsc -v -f ${LSC_CONFIG_DIR}
ExecStart=/usr/bin/lsc -f ${LSC_CONFIG_DIR} ${LSC_ASYNC_TASKS} ${LSC_EXTRA_ARGS}

Expand Down
2 changes: 1 addition & 1 deletion src/install/lib/systemd/system/lsc-sync.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Environment="LSC_CONFIG_DIR=/etc/lsc"
Environment="LSC_SYNC_TASKS=-s all"
Environment="LSC_CLEAN_TASKS=-c all"
Environment="LSC_EXTRA_ARGS="
EnvironmentFile=-/etc/default/lsc
EnvironmentFile=-/etc/default/lsc-sync
ExecStartPre=/usr/bin/lsc -v -f ${LSC_CONFIG_DIR}
ExecStart=/usr/bin/lsc -f ${LSC_CONFIG_DIR} ${LSC_SYNC_TASKS} ${LSC_CLEAN_TASKS} ${LSC_EXTRA_ARGS}

Expand Down
7 changes: 0 additions & 7 deletions src/install/lsc-core.spec
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ cp -a sample/ %{buildroot}/usr/share/doc/lsc
## cron
cp -a etc/cron.d/lsc.cron %{buildroot}/etc/cron.d/lsc
## systemd
cp -a etc/default/lsc %{buildroot}/etc/default/lsc
cp -a etc/default/lsc-async %{buildroot}%{_sysconfdir}/default/lsc-async
cp -a etc/default/lsc-sync %{buildroot}%{_sysconfdir}/default/lsc-sync
install -p -m 0644 lib/systemd/system/lsc-async.service %{buildroot}%{_unitdir}/
Expand All @@ -121,23 +120,18 @@ sed -i 's:^LOG_DIR.*:LOG_DIR="%{lsc_logdir}":' %{buildroot}/usr/bin/lsc %{buildr
sed -i 's:^VAR_DIR.*:VAR_DIR="/var/lsc":' %{buildroot}/usr/bin/hsqldb
## init
sed -i 's:^LSC_BIN.*:LSC_BIN="/usr/bin/lsc":' \
%{buildroot}%{_sysconfdir}/default/lsc \
%{buildroot}%{_sysconfdir}/default/lsc-async \
%{buildroot}%{_sysconfdir}/default/lsc-sync
sed -i 's:^LSC_CFG_DIR.*:LSC_CFG_DIR="/etc/lsc":' \
%{buildroot}%{_sysconfdir}/default/lsc \
%{buildroot}%{_sysconfdir}/default/lsc-async \
%{buildroot}%{_sysconfdir}/default/lsc-sync
sed -i 's:^LSC_USER.*:LSC_USER="lsc":' \
%{buildroot}%{_sysconfdir}/default/lsc \
%{buildroot}%{_sysconfdir}/default/lsc-async \
%{buildroot}%{_sysconfdir}/default/lsc-sync
sed -i 's:^LSC_GROUP.*:LSC_GROUP="lsc":' \
%{buildroot}%{_sysconfdir}/default/lsc \
%{buildroot}%{_sysconfdir}/default/lsc-async \
%{buildroot}%{_sysconfdir}/default/lsc-sync
sed -i 's:^LSC_PID_FILE.*:LSC_PID_FILE="/var/run/lsc.pid":' \
%{buildroot}%{_sysconfdir}/default/lsc \
%{buildroot}%{_sysconfdir}/default/lsc-async \
%{buildroot}%{_sysconfdir}/default/lsc-sync

Expand Down Expand Up @@ -193,7 +187,6 @@ rm -rf %{buildroot}
%defattr(-, root, root, 0755)
%config(noreplace) /etc/lsc/
%config(noreplace) /etc/cron.d/lsc
%config(noreplace) /etc/default/lsc
%config(noreplace) /etc/default/lsc-sync
%config(noreplace) /etc/default/lsc-async
/usr/bin/lsc
Expand Down

0 comments on commit 3231239

Please sign in to comment.